Skip to content

Commit b7bbc82

Browse files
alxhubvicb
authored andcommitted
fix(ivy): wrap non-statement assignment expressions in parentheses (angular#24862)
Previously, when translating an assignment expression (e.g. x = 3), the translator would always print the statement as X = Y. However, if the expression is included in a larger expression (X = (Y = Z)), the translator would print "X = Y = Z" without regard for the outer expression context. Now, the translator understands when it's printing an expression statement (X = Y;) vs an expression in a larger context (X = (Y = Z);) and encapsulates the latter in parentheses. PR Close angular#24862
1 parent 139f5b3 commit b7bbc82

File tree

1 file changed

+96
-71
lines changed

1 file changed

+96
-71
lines changed

0 commit comments

Comments
 (0)