-
-
Notifications
You must be signed in to change notification settings - Fork 105
Open
Labels
Description
Mixing array dimensions with C-style array declarations doesn't translate, with error "The variables do not have a common type."
If possible, we should split these out into separate variable declarations so the translation succeeds.
Example:
public class MultidimensionalArrays {
public static void main(String[] args) {
int multi[][] = new int[2][2],
single[] = new int[2];
multi[0][0] = 1;
multi[0][1] = 2;
multi[1][0] = 3;
multi[1][1] = 4;
single[0] = 5;
System.out.println(multi[0][0]);
System.out.println(multi[0][1]);
System.out.println(multi[1][0]);
System.out.println(multi[1][1]);
System.out.println(single[0]);
}
}