mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Another overeager type resolution removed.
This commit is contained in:
@@ -829,8 +829,7 @@ static inline bool sema_expr_analyse_enum_constant(SemaContext *context, Expr *e
|
||||
Decl *enum_constant = decl_find_enum_constant(decl, name);
|
||||
if (!enum_constant) return false;
|
||||
|
||||
// Resolve the structure at this point, since we might want to use the enum_constant
|
||||
if (!sema_resolve_type_structure(context, decl->type, decl->span)) return false;
|
||||
if (!sema_analyse_decl(context, decl)) return false;
|
||||
|
||||
assert(enum_constant->resolve_status == RESOLVE_DONE);
|
||||
expr->type = decl->type;
|
||||
@@ -2919,9 +2918,6 @@ static inline bool sema_expr_analyse_type_access(SemaContext *context, Expr *exp
|
||||
const char *name = identifier->identifier_expr.ident;
|
||||
bool is_const = identifier->identifier_expr.is_const;
|
||||
|
||||
// Make sure that we have the full type structure.
|
||||
if (!sema_resolve_type_structure(context, parent_type, expr->span)) return false;
|
||||
|
||||
if (!is_const)
|
||||
{
|
||||
TypeProperty property = type_property_by_name(name);
|
||||
|
||||
Reference in New Issue
Block a user