Bug 222933 - [1.5][compiler] The hierarchy of the type Foo is inconsistent with interface Generics
Summary: [1.5][compiler] The hierarchy of the type Foo is inconsistent with interface ...
Status: CLOSED DUPLICATE of bug 205235
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M3   Edit
Assignee: Srikanth Sankaran CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-17 06:00 EDT by Joseph Tsai CLA
Modified: 2010-03-08 08:24 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Tsai CLA 2008-03-17 06:00:25 EDT
Build ID: M20070921-1145

Steps To Reproduce:
1. New an interface named A<D>
2. New an class named B which implements A<D>
3. New an class named C which extends B
4. New an class named D which extends C
5. Open C.java in the eclipse editor, an error occurs on class C with error message "The hierarchy of the type C is inconsistent".


More information:
According to the semantics of "The hierarchy of the type Foo is inconsistent", when a class B implements an unknown interface X and a class C extends B, this error message occurs on class C. That is, in this case, A<D> is treated as an unknown interface in Eclipse, but A<D> is actually not unknown.

I've tried to compile the same classes using javac (JDK 6.0) without Eclipse, and no any error occurs, and the compiled program is executed as expected. That is, this case which is actually correct is treated as an error in Eclipse.
Comment 1 Srikanth Sankaran CLA 2009-12-16 00:24:10 EST
(In reply to comment #0)
> Build ID: M20070921-1145
> 
> Steps To Reproduce:
> 1. New an interface named A<D>
> 2. New an class named B which implements A<D>
> 3. New an class named C which extends B
> 4. New an class named D which extends C
> 5. Open C.java in the eclipse editor, an error occurs on class C with error
> message "The hierarchy of the type C is inconsistent".
> 
> 
> More information:
> According to the semantics of "The hierarchy of the type Foo is inconsistent",
> when a class B implements an unknown interface X and a class C extends B, this
> error message occurs on class C. That is, in this case, A<D> is treated as an
> unknown interface in Eclipse, but A<D> is actually not unknown.
> 
> I've tried to compile the same classes using javac (JDK 6.0) without Eclipse,
> and no any error occurs, and the compiled program is executed as expected. That
> is, this case which is actually correct is treated as an error in Eclipse.

This is not reproducible on HEAD as of date. For closure, I'll try
and see if this is a duplicate of some old bug that has been closed.
Comment 2 Srikanth Sankaran CLA 2009-12-16 02:41:40 EST
I verified that if I unapply the patch fixing bug# 205235, I get the
error reported in comment# 0

*** This bug has been marked as a duplicate of bug 205235 ***
Comment 3 Ayushman Jain CLA 2010-03-08 08:10:13 EST
Verified for 3.6M6 using build I20100305-1011.
Comment 4 Jay Arthanareeswaran CLA 2010-03-08 08:24:49 EST
Verified.