Skip to content

Conversation

@mmalerba
Copy link
Contributor

@mmalerba mmalerba commented Feb 25, 2025

Some fixes for exponentiation which was recently introduced in #59894

  • Makes exponentiation right-associative. For example, a ** b ** c should be equivalent to a ** (b ** c), not (a ** b) ** c
  • Ensures that required parentheses are preserved in the compiled output. Parentheses are required when a unary operator is used in the base of the exponentiation, for example (-1) ** 3

@mmalerba mmalerba added the target: major This PR is targeted for the next major release label Feb 25, 2025
@angular-robot angular-robot bot added the area: compiler Issues related to `ngc`, Angular's template compiler label Feb 25, 2025
@ngbot ngbot bot added this to the Backlog milestone Feb 25, 2025
@mmalerba mmalerba requested a review from crisbeto February 26, 2025 00:28
For example, `a ** b ** c` should be equivalent to `a ** (b ** c)`,
not `(a ** b) ** c`
…ions

Parentheses are required around a unary operator used in the base of an
exponentiation expression. For example: `(-1) ** 3`
Handle typeof and void expressions the same way as other unary operator
expressions.
@mmalerba mmalerba added the action: merge The PR is ready for merge by the caretaker label Feb 28, 2025
@mmalerba
Copy link
Contributor Author

This PR was merged into the repository by commit b70ad3c.

The changes were merged into the following branches: main

@mmalerba mmalerba closed this in 4fe489f Feb 28, 2025
mmalerba added a commit that referenced this pull request Feb 28, 2025
…ions (#60101)

Parentheses are required around a unary operator used in the base of an
exponentiation expression. For example: `(-1) ** 3`

PR Close #60101
mmalerba added a commit that referenced this pull request Feb 28, 2025
…#60101)

Handle typeof and void expressions the same way as other unary operator
expressions.

PR Close #60101
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Mar 31, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: compiler Issues related to `ngc`, Angular's template compiler target: major This PR is targeted for the next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants