From c8c93d7513071bcf4f02ad7ec010f1290b1c1c8c Mon Sep 17 00:00:00 2001 From: Benoit Giannangeli Date: Thu, 30 Jan 2025 21:57:15 +0100 Subject: [PATCH] fix: Fixed += --- src/Codegen.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Codegen.zig b/src/Codegen.zig index 52ce373b..73d78dbf 100644 --- a/src/Codegen.zig +++ b/src/Codegen.zig @@ -1666,7 +1666,7 @@ fn generateDot(self: *Self, node: Ast.Node.Index, breaks: ?*Breaks) Error!?*obj. _ = try self.generateNode(value, breaks); switch (tags[assign_token]) { - .PlusEqual => switch (type_defs[node].?.def_type) { + .PlusEqual => switch (type_defs[value].?.def_type) { .Integer => try self.OP_ADD_I(locations[value]), .Double => try self.OP_ADD_F(locations[value]), .List => try self.OP_ADD_LIST(locations[value]), @@ -3116,7 +3116,7 @@ fn generateNamedVariable(self: *Self, node: Ast.Node.Index, breaks: ?*Breaks) Er _ = try self.generateNode(value, breaks); switch (tags[components.assign_token.?]) { - .PlusEqual => switch (type_defs[node].?.def_type) { + .PlusEqual => switch (type_defs[value].?.def_type) { .Integer => try self.OP_ADD_I(locations[value]), .Double => try self.OP_ADD_F(locations[value]), .List => try self.OP_ADD_LIST(locations[value]),