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