KT-1538 proper boolean invertion
This commit is contained in:
@@ -468,8 +468,10 @@ public abstract class StackValue {
|
||||
private StackValue myOperand;
|
||||
|
||||
private Invert(StackValue operand) {
|
||||
super(operand.type);
|
||||
super(Type.BOOLEAN_TYPE);
|
||||
myOperand = operand;
|
||||
if(myOperand.type != Type.BOOLEAN_TYPE)
|
||||
throw new UnsupportedOperationException("operand of ! must be boolean");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -38,6 +38,7 @@ public class Not implements IntrinsicMethod {
|
||||
else {
|
||||
stackValue = receiver;
|
||||
}
|
||||
return StackValue.not(stackValue);
|
||||
stackValue.put(Type.BOOLEAN_TYPE, v);
|
||||
return StackValue.not(StackValue.onStack(Type.BOOLEAN_TYPE));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user