mirror of
https://github.com/odin-lang/Odin.git
synced 2026-10-09 06:12:05 -04:00
fix constant bit_field field access returning zero value
This commit is contained in:
1 parent
6d23dd8367
commit
a26aca2fe6
2 files changed
+26
-1
No files matched your search
+1
-1
@@ -5600,7 +5600,7 @@ gb_internal ExactValue get_constant_field_single(CheckerContext *c, ExactValue v
|
||||
if (success_) *success_ = false;
|
||||
if (finish_) *finish_ = true;
|
||||
return empty_exact_value;
|
||||
} else if (is_type_struct(node->tav.type)) {
|
||||
} else if (is_type_struct(node->tav.type) || is_type_bit_field(node->tav.type)) {
|
||||
bool found = false;
|
||||
for (Ast *elem : cl->elems) {
|
||||
if (elem->kind != Ast_FieldValue) {
|
||||
|
||||
Reference in new issue
Block a user