Community
Participate
Working Groups
public interface SampleClass<V> { public static enum Stuff{FIRST, SECOND, THIRD}; } import com.google.bigtable.SampleClass.Stuff; public class SampleClass2 { public void doSomething(Stuff thing) { } } public class SampleClass3 { public void doSomething() { SampleClass2 sample = new SampleClass2(); sample.doSomething(SampleClass.Stuff.FIRST); } } Gives the error: "The method doSomething(SampleClass.Stuff) in the type SampleClass2 is not applicable for the arguments (SampleClass<V>.Stuff)" I think that SampleClass and SampleClass<V> are equivelent and that this should not be an error.
Added GenericTypeTest#test619
Fixed by tuning semantics for creating raw enclosing types (along with fix for bug 84973). Fix will be released along with changes for bug 84496
Released
Created attachment 20979 [details] test case This test case still reports a problem
Reopen as the attached test case is still failing.
Created attachment 20996 [details] Apply on HEAD of org.eclipse.jdt.core.tests.compiler The problem has to do with incremental compilation. If you compile the three classes all together, there is no error, but if you define them one by one, then it doesn't work. You can reproduce in Eclipse by making a change to SampleClass3 and then compile it.
Binary scenario is a consequence of poor substitution of enum constant from binary type. Fixed by treating specially enum constants in ParameterizedFieldBinding constructor (field type gets set with param declaring class). Released GenericTypeTest#test650. Fixed
Verified in I20050510-0010 + JDT/Core HEAD 05/12