mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-01 12:18:15 +00:00
Fix Ir panic on using append() from within anonymous function #432
This commit is contained in:
+2
-1
@@ -1208,13 +1208,14 @@ void check_proc_body(CheckerContext *ctx_, Token token, DeclInfo *decl, Type *ty
|
|||||||
|
|
||||||
check_scope_usage(ctx->checker, ctx->scope);
|
check_scope_usage(ctx->checker, ctx->scope);
|
||||||
|
|
||||||
#if 0
|
#if 1
|
||||||
if (decl->parent != nullptr) {
|
if (decl->parent != nullptr) {
|
||||||
Scope *ps = decl->parent->scope;
|
Scope *ps = decl->parent->scope;
|
||||||
if (ps->flags & (ScopeFlag_File & ScopeFlag_Pkg & ScopeFlag_Global)) {
|
if (ps->flags & (ScopeFlag_File & ScopeFlag_Pkg & ScopeFlag_Global)) {
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
// NOTE(bill): Add the dependencies from the procedure literal (lambda)
|
// NOTE(bill): Add the dependencies from the procedure literal (lambda)
|
||||||
|
// But only at the procedure level
|
||||||
for_array(i, decl->deps.entries) {
|
for_array(i, decl->deps.entries) {
|
||||||
Entity *e = decl->deps.entries[i].ptr;
|
Entity *e = decl->deps.entries[i].ptr;
|
||||||
ptr_set_add(&decl->parent->deps, e);
|
ptr_set_add(&decl->parent->deps, e);
|
||||||
|
|||||||
Reference in New Issue
Block a user