mirror of
https://github.com/odin-lang/Odin.git
synced 2026-01-06 13:07:59 +00:00
Begin work for bit_set[...; [N]T] (not working)
This commit is contained in:
@@ -9947,10 +9947,14 @@ gb_internal ExprKind check_compound_literal(CheckerContext *c, Operand *o, Ast *
|
||||
}
|
||||
Type *et = base_type(t->BitSet.elem);
|
||||
isize field_count = 0;
|
||||
if (et->kind == Type_Enum) {
|
||||
if (et != nullptr && et->kind == Type_Enum) {
|
||||
field_count = et->Enum.fields.count;
|
||||
}
|
||||
|
||||
if (is_type_array(bit_set_to_int(t))) {
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user