diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-05-12 19:45:49 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-05-12 19:45:49 -0400 |
| commit | 79556883b4f5db0c7bc865335a6a25c065a61a16 (patch) | |
| tree | fab88ac99a94dbc264e0c33388d4df6223731f0c | |
| parent | e171d4a98caed10a7356d7cb78590cdf74443124 (diff) | |
Bugfixes
| -rw-r--r-- | compile.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -483,6 +483,7 @@ CORD compile_statement(env_t *env, ast_t *ast) } env_t *body_scope = fresh_scope(env); + body_scope->scope_prefix = CORD_EMPTY; for (arg_ast_t *arg = fndef->args; arg; arg = arg->next) { type_t *arg_type = get_arg_ast_type(env, arg); set_binding(body_scope, arg->name, new(binding_t, .type=arg_type, .code=CORD_cat("$", arg->name))); @@ -515,7 +516,7 @@ CORD compile_statement(env_t *env, ast_t *ast) CORD pop_code = CORD_EMPTY; if (fndef->cache->tag == Int && Match(fndef->cache, Int)->i < INT64_MAX) { pop_code = CORD_all("if (Table$length(cache) > ", compile(body_scope, fndef->cache), - ") Table$remove(&cache, NULL, table_info);\n"); + ") Table$remove(&cache, NULL, table_type);\n"); } CORD wrapper = CORD_all( |
