mirror of
https://github.com/JonathanFleischmann/CompilerULTIMATE.git
synced 2024-12-27 09:28:03 +00:00
Fixed while condition
This commit is contained in:
parent
a9bebece45
commit
adf00a1803
@ -62,6 +62,13 @@ public class TypedBinary implements TypedExpression {
|
||||
} else {
|
||||
throw new RuntimeException("Type mismatch in " + op);
|
||||
}
|
||||
} else if(op == Operator.EQ || op == Operator.NE){
|
||||
if(leftType == Type.INT && rightType == Type.INT || leftType == Type.BOOL && rightType == Type.BOOL){
|
||||
type = Type.BOOL;
|
||||
return Type.BOOL;
|
||||
} else {
|
||||
throw new RuntimeException("Type mismatch in " + op);
|
||||
}
|
||||
}
|
||||
|
||||
if (leftType == rightType && leftType != Type.VOID) {
|
||||
|
Loading…
Reference in New Issue
Block a user