Skip to content

fix(compiler-cli): always parenthesize object literals in TCB#67434

Merged
thePunderWoman merged 1 commit intoangular:mainfrom
crisbeto:literal-map-paren
Mar 4, 2026
Merged

fix(compiler-cli): always parenthesize object literals in TCB#67434
thePunderWoman merged 1 commit intoangular:mainfrom
crisbeto:literal-map-paren

Conversation

@crisbeto
Copy link
Member

@crisbeto crisbeto commented Mar 4, 2026

This is a follow-up to #67381 which introduced a subtle bug where depending on the type checking configuration, we may put an object literal directly in the TCB body which the TS compiler ends up interpreting as a block. These changes resolve the issue by always wrapping the literal in parentheses.

@crisbeto crisbeto added action: review The PR is still awaiting reviews from at least one requested reviewer target: minor This PR is targeted for the next minor release labels Mar 4, 2026
@angular-robot angular-robot bot added the area: compiler Issues related to `ngc`, Angular's template compiler label Mar 4, 2026
@ngbot ngbot bot added this to the Backlog milestone Mar 4, 2026
@crisbeto crisbeto requested a review from devversion March 4, 2026 08:49
This is a follow-up to angular#67381 which introduced a subtle bug where depending on the type checking configuration, we may put an object literal directly in the TCB body which the TS compiler ends up interpreting as a block. These changes resolve the issue by always wrapping the literal in parentheses.
@crisbeto crisbeto force-pushed the literal-map-paren branch from daadb91 to e5b0c6a Compare March 4, 2026 09:32
@crisbeto
Copy link
Member Author

crisbeto commented Mar 4, 2026

Passing TGP

@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note and removed action: review The PR is still awaiting reviews from at least one requested reviewer merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note labels Mar 4, 2026
@thePunderWoman thePunderWoman merged commit 2c87f21 into angular:main Mar 4, 2026
23 checks passed
@thePunderWoman
Copy link
Contributor

This PR was merged into the repository. The changes were merged into the following branches:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants