Bug 30805

Summary: Abstract non-visible method diagnosis fooled by intermediate declarations
Product: [Eclipse Project] JDT Reporter: Philipe Mulet <philippe_mulet>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: hudsonr
Version: 2.1   
Target Milestone: 2.1 M5   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

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.