Skip to content

Commit

Permalink
compiler: minor fix for assign statement optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
mertcandav committed Oct 23, 2024
1 parent 5f4e225 commit 892fc5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/julec/opt/scope.jule
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ impl scopeOptimizer {
| token::Id.CaretEq | token::Id.SolidusEq | token::Id.PercentEq
| token::Id.ShlEq | token::Id.ShrEq | token::Id.PlusEq | token::Id.MinusEq:
// Do not check structures.
if !Math || assign.Left.Type.Struct() != nil {
if !Math && !Str || assign.Left.Type.Struct() != nil {
break
}
oldId, oldKind := assign.Op.Id, assign.Op.Kind
Expand Down

0 comments on commit 892fc5b

Please sign in to comment.