allow .class field of arrays

git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@976 379699f6-c40d-0410-875b-85095c16579e
stable
jochen 26 years ago
parent ecd93bbac0
commit 1aa6f4f10d
  1. 4
      jode/jode/expr/IfThenElseOperator.java
  2. 4
      jode/jode/flow/CreateClassField.java

@ -87,7 +87,9 @@ public class IfThenElseOperator extends Operator {
String clazz =
((ConstOperator)invoke.subExpressions[0]).getValue();
if (field.setClassConstant(clazz))
return new ClassFieldOperator(Type.tClass(clazz));
return new ClassFieldOperator(clazz.charAt(0) == '['
? Type.tType(clazz)
: Type.tClass(clazz));
}
}
}

@ -71,7 +71,9 @@ public class CreateClassField {
String clazz = ((ConstOperator)param).getValue();
if (put.getField().setClassConstant(clazz)) {
cmp.setSubExpressions
(0, new ClassFieldOperator(Type.tClass(clazz)));
(0, new ClassFieldOperator(clazz.charAt(0) == '['
? Type.tType(clazz)
: Type.tClass(clazz)));
EmptyBlock empty = new EmptyBlock();
empty.moveJump(ifBlock.thenBlock.jump);
ifBlock.setThenBlock(empty);

Loading…
Cancel
Save