about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBaitinq <[email protected]>2025-07-13 10:49:55 +0200
committerBaitinq <[email protected]>2025-07-13 10:49:55 +0200
commit93b7cb871f613bf6ba8e982bbf7889f763330afc (patch)
treee531219b5cd72b0d403efaf20c085b8fe4a58d11
parentBoostrap: Fix function return types (diff)
downloadpry-lang-93b7cb871f613bf6ba8e982bbf7889f763330afc.tar.gz
pry-lang-93b7cb871f613bf6ba8e982bbf7889f763330afc.tar.bz2
pry-lang-93b7cb871f613bf6ba8e982bbf7889f763330afc.zip
Boostrap: Fix pointer derefence
-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{};