Community
Participate
Working Groups
M9+latest 1_5 from CVS Create two classes shown below in two compilation units. I get an error for "n.a.get(1).e(this)". Cheetah can't infer that the result of get(1) should be an N object. If I put both classes into one compilation unit, it works. Using an explicit cast "((N) n.a.get(1)).e(this)" also works. ---- import java.util.List; class N { List<N> a; void e(Q q) {} } ---- class Q { void e(N n) { n.a.get(1).e(this); } }
This raises a warning and shouldn't. Probably related to the above problem. class Q2 { void e2(N n) { Iterator<N> i = n.a.iterator(); } }
This only occurs in editor, not when building. The reason is that the JavaModel the editor relies upon is not fully aware yet of generics. I added recently support for type parameters of type, to get basic things working, but did not change type names to type signatures. Therefore, the model doesn't record the fact the signature of field 'a' is List<N>, and simply considers it to be raw type 'List'. Hence, it fools the compiler. When building though, the compiler is directly using the source/binaries, and thus doesn't get in trouble.
Support added in JavaModel (SourceTypeConverter is now able to recreate parameterized type references).
Fixed