aboutsummaryrefslogtreecommitdiff
path: root/src/compile/assignments.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-11-01 12:58:52 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-11-01 13:00:29 -0400
commit75bb38a10c9fa069cfbc731a1f50e4f977447987 (patch)
treeea73a85757262075f121d304846b256c7a82e54c /src/compile/assignments.c
parent874f7d750f39d154b9ecc9e7fb483eb6e7c43096 (diff)
Fix case where `foo.baz.method()` failed to pass `baz` as `(&(foo.baz))`
when `foo` was a `&Foo` and `baz.method()` takes a `&Baz`.
Diffstat (limited to 'src/compile/assignments.c')
-rw-r--r--src/compile/assignments.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compile/assignments.c b/src/compile/assignments.c
index 74d1b543..c0f45f5b 100644
--- a/src/compile/assignments.c
+++ b/src/compile/assignments.c
@@ -183,9 +183,9 @@ Text_t compile_lvalue(env_t *env, ast_t *ast) {
compile_type_info(container_t), ")");
}
return Texts("*(", compile_type(Type(PointerType, table_type->value_type)), ")Table$reserve(",
- compile_to_pointer_depth(env, index->indexed, 1, false), ", ",
- compile_to_type(env, index->index, Type(PointerType, table_type->key_type, .is_stack = true)),
- ", NULL,", compile_type_info(container_t), ")");
+ compile_to_pointer_depth(env, index->indexed, 1, false), ", ", "stack(",
+ compile_to_type(env, index->index, table_type->key_type), ")", ", NULL,",
+ compile_type_info(container_t), ")");
} else {
code_err(ast, "I don't know how to assign to this target");
}