Skip to content

Commit

Permalink
fix: Fixed +=
Browse files Browse the repository at this point in the history
  • Loading branch information
giann committed Jan 30, 2025
1 parent a48aff6 commit c8c93d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Codegen.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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]),
Expand Down Expand Up @@ -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]),
Expand Down

0 comments on commit c8c93d7

Please sign in to comment.