diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-10-05 16:30:21 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-10-05 16:30:21 -0400 |
| commit | 9b5b6b110bb80f8530dd7ca4e0cc9eb3236d8ad7 (patch) | |
| tree | 2e687a08c99d38d2e43a3e6cd4b3cbd67fcb02b2 | |
| parent | 9738b3454639ddf3ae46186a5c6ba671fe9a6861 (diff) | |
Fix typechecking issue
| -rw-r--r-- | src/compile/expressions.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compile/expressions.c b/src/compile/expressions.c index 4e6c720f..5ec90191 100644 --- a/src/compile/expressions.c +++ b/src/compile/expressions.c @@ -12,7 +12,7 @@ public Text_t compile_maybe_incref(env_t *env, ast_t *ast, type_t *t) { if (is_idempotent(ast) && can_be_mutated(env, ast)) { - type_t *actual = get_type(env, ast); + type_t *actual = get_type(with_enum_scope(env, t), ast); if (t->tag == ListType && type_eq(t, actual)) return Texts("LIST_COPY(", compile_to_type(env, ast, t), ")"); else if (t->tag == TableType && type_eq(t, actual)) return Texts("TABLE_COPY(", compile_to_type(env, ast, t), ")"); |
