Community
Participate
Working Groups
Cheetah03 The following program should compile clear: import java.util.ArrayList; public class X { public static void main(String[] args) { char[][] tokens = new char[0][]; ArrayList list = new ArrayList(); list.toArray(tokens); } }
Compiler says toArray(char[][]) is not applicable with char[][]. Problem is that one of these char[][] is actually incorrectly build as: (char[])[]. The code substituting T[] where T is char[], is incorrectly building the bogus array type. Adding regression test: GenericTypeTest#test147. Fixed.