}
return new NodePair(fn,last);
} else {
+ if(con.getArrayInitializer() == null) {
FlatNode first=null;
FlatNode last=null;
TempDescriptor[] temps=new TempDescriptor[con.numArgs()];
return new NodePair(first,np.getEnd());
} else
return new NodePair(first, fn);
+ } else if(state.MGC) {
+ // array creation with initializers
+ return flattenArrayInitializerNode(con.getArrayInitializer(), out_temp);
+ }
+ return null;
}
}
if (td!=null&&!typeutil.isSuperorType(td, typetolookin))
throw new Error(typetolookin + " isn't a "+td);
+
+ /* Check Array Initializers */
+ if(state.MGC && (con.getArrayInitializer() != null)) {
+ checkArrayInitializerNode(md, nametable, con.getArrayInitializer(), td);
+ }
/* Check flag effects */
if (con.getFlagEffects()!=null) {
for(int i = 0; i < ait.sa.length; i++) {
System.out.println(ait.sa[i]);
}
+
+ int[][] ja = new int[][]{null, {3,4}};
+ for (int i = 0; i < 2; i++) {
+ if(ja[i] != null) {
+ for (int j = 0; j < 2; j++) {
+ System.out.println(ja[i][j]);
+ }
+ } else {
+ System.out.println("ja[" + i + "] is null");
+ }
+ }
}
}
\ No newline at end of file