Fixed TypedUnary Type

This commit is contained in:
Ahmad 2024-06-23 17:13:26 +02:00
parent 8209ca9c2c
commit 49afcac4cf

View File

@ -42,7 +42,7 @@ public class TypedUnary implements TypedExpression {
TypedProgram.addException(UnaryOperator.SUB.name(),new RuntimeException("Minus operator must be applied to int") );
return null;
}
return Type.INT;
return Type.BOOL;
}
TypedProgram.addException("UnknownUnary",new RuntimeException("Unknown unary operator") );
return null;