This program does not compile:
import java.util.List;
public class Main {
static <T> T[] makeArray(T... args) {
return args;
}
public static <S> void test() {
S[] stringLists = makeArray(null, null);
}
}
Comments
EVALUATION
A bug. The compiler should infer S for T.