mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 03:51:18 +00:00
Additional fix for #2853
This commit is contained in:
@@ -10938,6 +10938,12 @@ static inline bool sema_expr_analyse_lambda(SemaContext *context, Type *target_t
|
||||
// so we'll declare it as weak and externally visible.
|
||||
unit_register_external_symbol(context, decl);
|
||||
|
||||
if (context->generic_instance)
|
||||
{
|
||||
decl->is_templated = true;
|
||||
decl->instance_id = declid(context->generic_instance);
|
||||
}
|
||||
|
||||
// Before function analysis, lambda evaluation is deferred
|
||||
if (unit->module->stage < ANALYSIS_FUNCTIONS)
|
||||
{
|
||||
@@ -10947,11 +10953,6 @@ static inline bool sema_expr_analyse_lambda(SemaContext *context, Type *target_t
|
||||
decl->var.is_read = true;
|
||||
}
|
||||
decl_flatten(decl)->is_external_visible = true;
|
||||
if (context->generic_instance)
|
||||
{
|
||||
decl->is_templated = true;
|
||||
decl->instance_id = declid(context->generic_instance);
|
||||
}
|
||||
vec_add(unit->module->lambdas_to_evaluate, decl);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user