Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(compiler): not catching for loop empty tracking expressions #54772

Closed
wants to merge 1 commit into from

Conversation

crisbeto
Copy link
Member

@crisbeto crisbeto commented Mar 8, 2024

Fixes that the template parser wasn't catching empty expressions in the track parameter of for loops.

Fixes #54763.

Fixes that the template parser wasn't catching empty expressions in the `track` parameter of for loops.

Fixes angular#54763.
@crisbeto crisbeto added action: review The PR is still awaiting reviews from at least one requested reviewer target: patch This PR is targeted for the next patch release labels Mar 8, 2024
@crisbeto crisbeto requested a review from atscott March 8, 2024 13:08
@@ -1520,6 +1520,11 @@ describe('R3 template transform', () => {
@case {case}
}
`)).toThrowError(/@case block must have exactly one parameter/);
expect(() => parse(`
@switch (cond) {
@case ( ) {case}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added some extra tests for switches and conditionals, but they didn't have this problem.

@pkozlowski-opensource
Copy link
Member

Thank you @crisbeto !

@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Mar 11, 2024
@crisbeto crisbeto removed the request for review from atscott March 11, 2024 15:57
@atscott atscott closed this in 81ccf5d Mar 11, 2024
@atscott
Copy link
Contributor

atscott commented Mar 11, 2024

This PR was merged into the repository by commit 81ccf5d.

atscott pushed a commit that referenced this pull request Mar 11, 2024
Fixes that the template parser wasn't catching empty expressions in the `track` parameter of for loops.

Fixes #54763.

PR Close #54772
atscott pushed a commit that referenced this pull request Mar 11, 2024
Fixes that the template parser wasn't catching empty expressions in the `track` parameter of for loops.

Fixes #54763.

PR Close #54772
@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 Apr 11, 2024
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 target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

compiler: cryptic error when the track expression is empty for the control flow @for
4 participants