Community
Participate
Working Groups
For the following code : anArrayIsAListIsAnArray() { val x = newArrayList('foo','bar','baz').toArray val arrayAccess = new ArrayAccess(x) arrayAccess.set(1,arrayAccess.get(0)) return arrayAccess.get(2) } non compilable code is generated (wrong usage if wildcards) // the referenced Java class for completeness : public class ArrayAccess<T> { private T[] internal; public ArrayAccess(T[] internal) { super(); this.internal = internal; } public T get(int index) { return internal[index]; } public T set(int index, T value) { return internal[index] = value; } public <X> ArrayAccess<X> access(X[] val) { return new ArrayAccess<X>(val); } }
Does it compile if you pass the type arguments to the constructor invocation? IIRC we don't have type inference for constructor args and an open issue regarding the validation of type arguments.
Preliminary scheduled for 2.0RC1
postponed to SR1
Pushed to master.
Closing all bugs that were set to RESOLVED before Neon.0