about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBaitinq <[email protected]>2025-07-05 23:51:35 +0200
committerBaitinq <[email protected]>2025-07-05 23:51:35 +0200
commit7218121243a9311bf6e8ca9695c2522061b94c02 (patch)
treeeb6e8755279e1a2e2ff2419c044b0e56fa3a26a5
parentBoostrap: Get printf working (diff)
downloadpry-lang-7218121243a9311bf6e8ca9695c2522061b94c02.tar.gz
pry-lang-7218121243a9311bf6e8ca9695c2522061b94c02.tar.bz2
pry-lang-7218121243a9311bf6e8ca9695c2522061b94c02.zip
Codegen: Fix pointer assignment type checking
-rw-r--r--src/codegen.zig1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/codegen.zig b/src/codegen.zig
index 1123db8..2ece01e 100644
--- a/src/codegen.zig
+++ b/src/codegen.zig
@@ -206,6 +206,7 @@ pub const CodeGen = struct {
                 const xd = assignment_statement.lhs.UNARY_EXPRESSION.expression;
                 const a = try self.generate_expression_value(xd, null);
                 const variable = try self.generate_expression_value(assignment_statement.rhs, null);
+                std.debug.assert(self.compare_types(a.node_type, variable.node_type, true));
                 _ = llvm.LLVMBuildStore(self.builder, variable.value, a.value);
             },
             .FIELD_ACCESS => |field_access| {