mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 03:51:18 +00:00
Resolving &X.b when X is a const incorrectly checked for runtime constness #2842
Creating a generic instance fails if it is created after interface checking #2840
This commit is contained in:
@@ -5374,7 +5374,29 @@ FOUND:;
|
||||
break;
|
||||
}
|
||||
}
|
||||
ASSERT(stage < ANALYSIS_INTERFACE);
|
||||
if (stage < ANALYSIS_INTERFACE) goto EXIT;
|
||||
if (compiler.context.errors_found) return poisoned_decl;
|
||||
FOREACH(Decl *, decl, copied)
|
||||
{
|
||||
SemaContext context_gen;
|
||||
switch (decl->decl_kind)
|
||||
{
|
||||
case DECL_TYPEDEF:
|
||||
case DECL_STRUCT:
|
||||
case DECL_UNION:
|
||||
case DECL_ENUM:
|
||||
case DECL_BITSTRUCT:
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
}
|
||||
if (decl->interfaces)
|
||||
{
|
||||
sema_context_init(&context_gen, decl->unit);
|
||||
sema_check_interfaces(&context_gen, decl);
|
||||
sema_context_destroy(&context_gen);
|
||||
}
|
||||
}
|
||||
EXIT:;
|
||||
if (compiler.context.errors_found) return poisoned_decl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user