From 3d351ee02b8067fd92fd8c94232913545be29a0f Mon Sep 17 00:00:00 2001 From: Fabian Noll Date: Fri, 31 May 2024 17:11:46 +0200 Subject: [PATCH] fix false error message --- src/Typecheck.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Typecheck.hs b/src/Typecheck.hs index f7e63ae..ac08d39 100644 --- a/src/Typecheck.hs +++ b/src/Typecheck.hs @@ -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