From f735e794a6ddaabe4289834783f562a13b2c9560 Mon Sep 17 00:00:00 2001 From: A1029384756 Date: Thu, 4 Jun 2026 16:03:45 -0400 Subject: [PATCH] [checker] disallow `*` and `/` for bit sets --- src/check_expr.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/check_expr.cpp b/src/check_expr.cpp index 8681d22ba..c373c2738 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -2131,6 +2131,10 @@ gb_internal bool check_binary_op(CheckerContext *c, Operand *o, Token op) { /*fallthrough*/ case Token_Mul: case Token_MulEq: + if (is_type_bit_set(type)) { + error(op, "Operator '%.*s' is not allowed with bit sets", LIT(op.string)); + return false; + } case Token_AddEq: if (is_type_bit_set(type)) { return true;