operands do propagate! (boolean vs int)

git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@365 379699f6-c40d-0410-875b-85095c16579e
stable
jochen 26 years ago
parent b87c2ddd26
commit 499d704e01
  1. 23
      jode/jode/expr/BinaryOperator.java

@ -21,11 +21,9 @@ package jode.expr;
import jode.Type;
public class BinaryOperator extends SimpleOperator {
protected Type operandType;
public BinaryOperator(Type type, int op) {
super(type, op, 2);
operandType = type;
}
public int getPriority() {
@ -57,22 +55,13 @@ public class BinaryOperator extends SimpleOperator {
return getPriority() + i;
}
// public Type getOperandType(int i) {
// return operandType;
// }
// public void setOperandType(Type[] inputTypes) {
// operandType = operandType
// .intersection(inputTypes[0]).intersection(inputTypes[1]);
// type = operandType;
// }
public Type getOperandType(int i) {
return type;
}
// /**
// * Sets the return type of this operator.
// */
// public void setType(Type newType) {
// type = operandType = operandType.intersection(newType);
// }
public void setOperandType(Type[] inputTypes) {
setType(inputTypes[0].intersection(inputTypes[1]));
}
public boolean equals(Object o) {
return (o instanceof BinaryOperator) &&

Loading…
Cancel
Save