Community
Participate
Working Groups
From the news: ------------------------------------------------------------- In the following example, the eclipse compiler complains Class1.this in the assignment statement as being incorrect. The actual error message is "Type mismatch: cannot convert from Class1<V,R> to Class1<V,R>". I think this is a valid qualified expression. Any clue what may be wrong? public class Class1<V, R> { private class InnerClass1 { void foo() { Class1<V, R> c = Class1.this; } } } -- Venkatesh Prasad Ranganath, Dept. Computing and Information Science, Kansas State University, US. web: http://www.cis.ksu.edu/~rvprasa ------------------------------------------------------------- The problem seems to be that Class1.this has a generic type binding instead of a parameterized one. The wrong compile error also appears without the inner type: class Class1<V, R> { void m() { Class1<V, R> c2 = this; // correct: isParameterizedType Class1<V, R> c3 = Class1.this; //wrong compile error: isGenericType } }
I20051220-0800, same in 3.2M4.
Added GenericTypeTest#test879. Good diagnostic. This problem only exists in 3.2 stream, as it is a consequence of merge of generic and parameterized bindings. One instance got mistaken. Fixed in latest. No need to backport to 3.1.2 (where problem doesn't exist).
Verified for 3.2 M5 using build I20060214-0010
*** Bug 163262 has been marked as a duplicate of this bug. ***