diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2025-08-10 12:47:15 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-10 12:47:15 +0100 |
| commit | a0ff05e63307f533b384820717bb582e1ff47c39 (patch) | |
| tree | d9adfd28090dc72044003fed211383a63bdb3587 /src/check_decl.cpp | |
| parent | dbc338248e8693994f232d02f1aff9536f204add (diff) | |
| parent | 14ca1c8c89dd219dd52d061649d4db7778df2e64 (diff) | |
Merge pull request #5558 from odin-lang/bill/init-fini-changes
`@(init)` & `@(finit)` Changes.
Diffstat (limited to 'src/check_decl.cpp')
| -rw-r--r-- | src/check_decl.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/check_decl.cpp b/src/check_decl.cpp index af46ee40e..ee7906e5e 100644 --- a/src/check_decl.cpp +++ b/src/check_decl.cpp @@ -1851,6 +1851,12 @@ gb_internal void check_entity_decl(CheckerContext *ctx, Entity *e, DeclInfo *d, c.scope = d->scope; c.decl = d; c.type_level = 0; + c.curr_proc_calling_convention = ProcCC_Contextless; + + auto prev_flags = c.scope->flags; + defer (c.scope->flags = prev_flags); + c.scope->flags &= ~ScopeFlag_ContextDefined; + e->parent_proc_decl = c.curr_proc_decl; e->state = EntityState_InProgress; |