Bug 128063 - [1.5][compiler] Compiler reports errors against compilabale code
Summary: [1.5][compiler] Compiler reports errors against compilabale code
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: 3.2 M6   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-15 12:17 EST by Andrey ''Bass'' Shcheglov CLA
Modified: 2006-03-28 04:07 EST (History)
0 users

See Also:


Attachments
a/AbstractFoo.java (196 bytes, text/java)
2006-02-15 12:20 EST, Andrey ''Bass'' Shcheglov CLA
no flags Details
b/CustomFoo.java (487 bytes, text/java)
2006-02-15 12:21 EST, Andrey ''Bass'' Shcheglov CLA
no flags Details
b/DefaultFoo.java (1.13 KB, text/java)
2006-02-15 12:22 EST, Andrey ''Bass'' Shcheglov CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey ''Bass'' Shcheglov CLA 2006-02-15 12:17:23 EST
The code sample involving 4 classes (3 toplevel ones) is cleanly compilable with javac 1.5.0_06 (linux-i386, linux-amd64) and Eclipse 3.2.0M3, but _is not_ with Eclipse 3.2.0M4 (the same platforms).

There's one more issue with that: actually Eclipse _does compile_ the code (all *.class files are present in the output folder), but reports an error about parameterized type not visible.
Comment 1 Andrey ''Bass'' Shcheglov CLA 2006-02-15 12:20:30 EST
Created attachment 34782 [details]
a/AbstractFoo.java
Comment 2 Andrey ''Bass'' Shcheglov CLA 2006-02-15 12:21:12 EST
Created attachment 34783 [details]
b/CustomFoo.java
Comment 3 Andrey ''Bass'' Shcheglov CLA 2006-02-15 12:22:05 EST
Created attachment 34784 [details]
b/DefaultFoo.java
Comment 4 Andrey ''Bass'' Shcheglov CLA 2006-02-15 12:23:17 EST
Testcase (3 Java source files) added as attachments.
Comment 5 Philipe Mulet CLA 2006-02-28 09:47:52 EST
Problem comes from uniformization of parameterized bindings. In one situation, it still checked only for enclosing generic type (instead of param type as well in inherited member type scenario).

Same issue for parameterized qualified type references.


Simpler testcase:
public class X<T> {
	static class Inner<U> {
	}
}
class Y<W> extends X<W> {
	void foo() {
		Inner<W> inner = null;
		String s = inner; // error msg should show X.Inner<W> 
                                  // instead of not: X<W>.Inner<W>
	}
}
Comment 6 Philipe Mulet CLA 2006-02-28 09:53:08 EST
Testcase with qualified name, only error should be reported on String assignment:
public class X<T> {
	static class Inner<U> {
		class InInner <V> {
		}
	}
}
class Y<W> extends X<W> {
	void foo() {
		Inner<W>.InInner<W> inner = null;
		String s = inner;
	}
}
Comment 7 Philipe Mulet CLA 2006-02-28 10:05:07 EST
Added GenericTypeTest#test933-936.
Fixed
Comment 8 David Audel CLA 2006-03-28 04:07:05 EST
Verified for 3.2 M6 using build I20060328-0010