From 499d704e016793866bf047574fc0d0c4e02a665f Mon Sep 17 00:00:00 2001 From: jochen Date: Thu, 11 Mar 1999 22:50:46 +0000 Subject: [PATCH] operands do propagate! (boolean vs int) git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@365 379699f6-c40d-0410-875b-85095c16579e --- jode/jode/expr/BinaryOperator.java | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/jode/jode/expr/BinaryOperator.java b/jode/jode/expr/BinaryOperator.java index 3e1be43..ece77a2 100644 --- a/jode/jode/expr/BinaryOperator.java +++ b/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) &&