Bug 75400

Summary: [1.5] Wrong type mismatch error reported
Product: [Eclipse Project] JDT Reporter: Olivier Thomann <Olivier_Thomann>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.0   
Target Milestone: 3.1 M3   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Olivier Thomann CLA 2004-09-30 13:59:29 EDT
Using the latest code, the following code reports an error and it should not:

public class X<T> implements I<T> {
    public I.A foo() {
        return a;
    }
}    
interface I<T> {
    A a = new A();
    class A {
    }
}

We report:
----------
1. ERROR in c:\tests_sources\X.java (at line 3)
	return a;
	       ^
Type mismatch: cannot convert from I<T>.A to I.A
----------
1 problem (1 error)

javac 1.5 compiles it without error.
Comment 1 Philipe Mulet CLA 2004-10-28 16:09:52 EDT
Implementation of type equivalence was incorrectly rejecting this scenario (due
to  check on no type variables improper for member types).

Added regression test: GenericTypeTest#test326.
Fixed
Comment 2 David Audel CLA 2004-11-04 10:09:17 EST
Verified for 3.1M3 with build I200411040100