Merge pull request #6777 from A1029384756/bit_set_ops

[checker] disallow `*` and `/` for bit sets
This commit is contained in:
gingerBill
2026-06-04 21:26:26 +01:00
committed by GitHub

View File

@@ -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;