mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
+2
-6
@@ -10335,13 +10335,10 @@ gb_internal ExprKind check_compound_literal(CheckerContext *c, Operand *o, Ast *
|
|||||||
is_constant = false;
|
is_constant = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cl->elems[0]->kind == Ast_FieldValue) {
|
|
||||||
error(cl->elems[0], "'field = value' in a bit_set a literal is not allowed");
|
|
||||||
is_constant = false;
|
|
||||||
} else {
|
|
||||||
for (Ast *elem : cl->elems) {
|
for (Ast *elem : cl->elems) {
|
||||||
if (elem->kind == Ast_FieldValue) {
|
if (elem->kind == Ast_FieldValue) {
|
||||||
error(elem, "'field = value' in a bit_set a literal is not allowed");
|
error(elem, "'field = value' in a bit_set literal is not allowed");
|
||||||
|
is_constant = false;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -10382,7 +10379,6 @@ gb_internal ExprKind check_compound_literal(CheckerContext *c, Operand *o, Ast *
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case Type_BitField: {
|
case Type_BitField: {
|
||||||
|
|||||||
Reference in New Issue
Block a user