Closed bys1 closed 1 year ago
Thanks; that's a missing test case too.
The newInitArray
case is entirely missing from the expression compiler. weird!
Aha. The code was still written for two overloaded cases of newArray
, one with a list of initializers and one with the size expression.
case "newArray":
if (exp.get(1) instanceof IList) {
return newArrayExp(AST.$getType(exp), AST.$getArgs(exp), line);
}
else {
return newArrayExp(AST.$getType(exp), AST.$getSize(exp), line);
}
I have the following module:
I have a simple method where I declare an array of integers and initialize it with the values 10, 20, 30. When calling
compileTest
, Flybytes gives the following error:I have tried this with an
int
array and with ajava.lang.Integer
array. Both give this error. When I change the array to simply initialize it without values, it compiles properly:However, when decompiling this, I get another error:
This error only happens with an
int
array. When I change the type toarray(object("java.lang.Integer"))
, decompilation works fine. I think this error happens with arrays of primitive types only.