Bug 30805 - Abstract non-visible method diagnosis fooled by intermediate declarations
Summary: Abstract non-visible method diagnosis fooled by intermediate declarations
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1 M5   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-03 06:14 EST by Philipe Mulet CLA
Modified: 2003-02-10 13:00 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipe Mulet CLA 2003-02-03 06:14:21 EST
Build 20030129

The following code should be rejected by the compiler:

============= p/X.java
package p;
public abstract class X {
	abstract void foo();
}
============= q/Y.java
abstract class Y extends X {
        void foo(){}
}
class Z extends Y {}
============= 

It should complain that Z should implement abstract (non-visible) method #foo().

Note that the compiler already diagnosed that Y.foo() did not override X.foo() 
(warning).
Comment 1 Philipe Mulet CLA 2003-02-03 06:49:03 EST
Fixed, method verifier got fooled by intermediate method presence (did not 
bother looking at X.foo() abstract method any longer.
Comment 2 Randy Hudson CLA 2003-02-10 09:52:41 EST
I'm confused as to why this test case should be rejected.  It looks completely 
valid to me.
Comment 3 Philipe Mulet CLA 2003-02-10 10:47:44 EST
Since Y.foo() doesn't override default X.foo() as it cannot see it. It should 
be equivalent to a scenario where Y did not define any #foo() at all.
Comment 4 Randy Hudson CLA 2003-02-10 11:34:26 EST
I must be dislexic.  Now I see that 'p' and 'q' are different.  Thanks.
Comment 5 Philipe Mulet CLA 2003-02-10 12:23:12 EST
No problem, actually my test case q\Y.java is missing the package declaration 
too...

Comment 6 David Audel CLA 2003-02-10 13:00:45 EST
Verified.