fix false error message
This commit is contained in:
parent
05b599b8ff
commit
3d351ee02b
@ -324,7 +324,7 @@ checkBitwiseOperation :: BinaryOperator -> Expression -> Expression -> DataType
|
||||
checkBitwiseOperation op expr1' expr2' type1 type2
|
||||
| type1 == "int" && type2 == "int" =
|
||||
TypedExpression "int" (BinaryOperation op expr1' expr2')
|
||||
| otherwise = error $ "Bitwise operation " ++ show op ++ " requires operands of type int"
|
||||
| otherwise = error $ "Bitwise operation " ++ show op ++ " requires operands of type int or char"
|
||||
|
||||
checkComparisonOperation :: BinaryOperator -> Expression -> Expression -> DataType -> DataType -> Expression
|
||||
checkComparisonOperation op expr1' expr2' type1 type2
|
||||
|
Loading…
Reference in New Issue
Block a user