mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Unable to access fields of a const inline enum with an aggregate underlying type. #2802
This commit is contained in:
@@ -251,6 +251,14 @@ Expr *sema_enter_inline_member(Expr *parent, CanonicalType *type)
|
||||
expr->type = type;
|
||||
break;
|
||||
}
|
||||
case TYPE_CONST_ENUM:
|
||||
{
|
||||
Decl *decl = type->decl;
|
||||
if (!decl->is_substruct) return NULL;
|
||||
expr = expr_copy(parent);
|
||||
expr->type = decl->enums.type_info->type;
|
||||
return expr;
|
||||
}
|
||||
case TYPE_ENUM:
|
||||
{
|
||||
Decl *decl = type->decl;
|
||||
|
||||
Reference in New Issue
Block a user