diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-10-09 00:36:00 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-10-09 00:36:00 -0400 |
| commit | fcbdf183159a94fd87be610887e076f6339fde28 (patch) | |
| tree | b95cc4048d2d3bcf9a9426361d40c42ae0f9d2be /compile.c | |
| parent | 7e7ac77021f407d0c277d54ce4ad55ecf3942039 (diff) | |
Bugfix for `defer` using enclosing scope
Diffstat (limited to 'compile.c')
| -rw-r--r-- | compile.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -2526,6 +2526,7 @@ CORD compile(env_t *env, ast_t *ast) struct { const char *name; binding_t *b; } *entry = Table$entry(*closed_vars, i); if (entry->b->type->tag == ModuleType) continue; + set_binding(body_scope, entry->name, new(binding_t, .type=entry->b->type, .code=CORD_cat("userdata->", entry->name))); def = CORD_all(def, compile_declaration(entry->b->type, entry->name), "; "); } def = CORD_all(def, "} ", name, "$userdata_t;"); |
