From 93b7cb871f613bf6ba8e982bbf7889f763330afc Mon Sep 17 00:00:00 2001 From: Baitinq Date: Sun, 13 Jul 2025 10:49:55 +0200 Subject: Boostrap: Fix pointer derefence --- src/bootstrap/codegen.pry | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/bootstrap/codegen.pry b/src/bootstrap/codegen.pry index 5fdc891..b627114 100644 --- a/src/bootstrap/codegen.pry +++ b/src/bootstrap/codegen.pry @@ -765,6 +765,12 @@ let codegen_generate_assignment_statement = (c: *codegen, stmt: *NODE_ASSIGNMENT if (*variable).value != cast(LLVMValueRef, null) { LLVMBuildStore((*c).builder, (*variable).value, ptr); }; + + if (*stmt).is_dereference { + let v = environment_get_variable((*c).environment, identifier); + assert(v != cast(*Variable, null)); + ptr = (*v).value; + }; let new_variable = Variable{}; -- cgit 1.4.1