Regression: Generic type could not be found in lambda inside macro #2853

This commit is contained in:
Christoffer Lerno
2026-01-27 14:23:41 +01:00
parent f3ede27f60
commit 0b5064683f
2 changed files with 31 additions and 0 deletions

View File

@@ -10947,6 +10947,11 @@ 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