about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/bootstrap/codegen.pry6
1 files changed, 6 insertions, 0 deletions
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{};