Community
Participate
Working Groups
Cheetah-03 The following program should compile clear. import java.util.ArrayList; import java.util.List; public class Z <T extends List> { T t; public static void main(String[] args) { foo(new Z<ArrayList>().set(new ArrayList<String>())); System.out.println("SUCCESS"); } Z<T> set(T t) { this.t = t; return this; } T get() { return this.t; } static void foo(Z<? super ArrayList> za) { za.get().isEmpty(); } }
Fixed. Tuning in wildcards was necessary. Added regression test GenericTypeTest#test134
Fixed