Bug 59723

Summary: [1.5] Compiler rejects usage of ArrayList.toArray(char[][])
Product: [Eclipse Project] JDT Reporter: Philipe Mulet <philippe_mulet>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.0   
Target Milestone: 3.1 M1   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Philipe Mulet CLA 2004-04-22 18:00:26 EDT
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);
    }    	
}
Comment 1 Philipe Mulet CLA 2004-04-22 18:03:17 EDT
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.