fix(compiler): Keep paraenthesis in Nullish + Boolean expression. #63292
Closed
JeanMeche wants to merge 1 commit intoangular:mainfrom
Closed
fix(compiler): Keep paraenthesis in Nullish + Boolean expression. #63292JeanMeche wants to merge 1 commit intoangular:mainfrom
JeanMeche wants to merge 1 commit intoangular:mainfrom
Conversation
3816081 to
49832a3
Compare
49832a3 to
074e948
Compare
mmalerba
approved these changes
Aug 20, 2025
packages/compiler/src/template/pipeline/src/phases/strip_nonrequired_parentheses.ts
Outdated
Show resolved
Hide resolved
Ts 5.9 introduced a regression coming from 5.8 when parenthesis aren't generated for expressions like (`(a ?? b) && c`). This fix works around this explicitly specifying that we want to keep those parenthesis that we're aware of in this specific case; This change can be reverted if the root issue (microsoft/TypeScript#61369) is fixed. (but let's keep the tests in any case for the coverage) fixes angular#63287
074e948 to
fdf999d
Compare
Member
Author
Member
|
This PR was merged into the repository by commit 827c3c1. The changes were merged into the following branches: main, 20.2.x |
crisbeto
pushed a commit
that referenced
this pull request
Aug 21, 2025
…3292) Ts 5.9 introduced a regression coming from 5.8 when parenthesis aren't generated for expressions like (`(a ?? b) && c`). This fix works around this explicitly specifying that we want to keep those parenthesis that we're aware of in this specific case; This change can be reverted if the root issue (microsoft/TypeScript#61369) is fixed. (but let's keep the tests in any case for the coverage) fixes #63287 PR Close #63292
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ts 5.9 introduced a regression coming from 5.8 when parenthesis aren't generated for expressions like (
(a ?? b) && c).This fix works around this explicitly specifying that we want to keep those parenthesis that we're aware of in this specific case;
This change can be reverted if the root issue (microsoft/TypeScript#61369) is fixed. (but let's keep the tests in any case for the coverage)
fixes #63287