Community
Participate
Working Groups
The code: result = new ArrayElement<Name<?>>(name, indices) previously resulted in the working code: ArrayElement<Name<? extends Object>> _arrayElement_1 = new ArrayElement<Name<? extends Object>>(result, _vHDL_1); but with 2.4.3 it generates: ArrayElement<Name<? extends Object>> _arrayElement_1 = new ArrayElement<Name<?>>(result, _vHDL_1); Which is not correct: Type mismatch: cannot convert from ArrayElement<Name<?>> to ArrayElement<Name<? extends Object>>
Does the class Name declare an upper bound constraint for the type parameter?
Name is declared as: public abstract class Name<T extends Name<?>> extends Primary { and primary as: public abstract class Primary<T extends Primary<?>> extends Expression<T> { (They fucked up the library here so that you can not do the Primary parametrization correctly... It is thus a raw type) The result type is forced from the parameter list: def private Name<?> getRef(Name<?> name, HDLVariableRef ref) { var result = name If I remove the wildcard at the parameter, as well as the constructtor invocation, then it compiles..
Here is a minimal working example: import java.util.List import java.util.LinkedList class A<T extends A<?>> { } class B<T extends B<?>> extends A { } class Bug417776 { def test(List<A<?>> t){ var a=t a=new LinkedList<A<?>> } }