A new exception for CheckNullOperator

git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@231 379699f6-c40d-0410-875b-85095c16579e
stable
delwi 26 years ago
parent 35ac1927ce
commit 089e466e81
  1. 13
      jode/jode/expr/ComplexExpression.java

@ -211,9 +211,11 @@ public class ComplexExpression extends Expression {
boolean changed = false;
for (int i=0; i < subExpressions.length; i++) {
Type opType;
if (i == 0 && operator instanceof ArrayStoreOperator) {
if (operator instanceof CheckNullOperator
|| i == 0 && operator instanceof ArrayStoreOperator) {
/* No rule without exception:
* We can always use tSubType, except for the
* check null operator and the
* array operand of an array store instruction.
*/
opType = operator.getOperandType(i);
@ -239,11 +241,12 @@ public class ComplexExpression extends Expression {
Type types[] = new Type[subExpressions.length];
boolean changed = false;
for (int i=0; i < types.length; i++) {
if (i == 0 && operator instanceof ArrayStoreOperator) {
if (operator instanceof CheckNullOperator
|| i == 0 && operator instanceof ArrayStoreOperator) {
/* No rule without exception:
* We can always use tSuperType, except for the
* array operand of an array store instruction.
*/
* We can always use tSuperType, except for the
* array operand of an array store instruction.
*/
types[i] = subExpressions[i].getType();
} else
types[i] = Type.tSuperType

Loading…
Cancel
Save