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): report better error on interpolation in an expression #30300
fix(compiler): report better error on interpolation in an expression #30300
Conversation
Hi @krzysztof-grzybek, thanks for the fix. Are you still interested in working on this? You'll need to rebase this and update the test a bit, but other than that this looks like a reasonable fix to me. |
e4aa699
to
1839990
Compare
Yes, I will fix it in the next few days, probably tommorow. |
817b001
to
d94d7b5
Compare
Compiler results in weird error message when encounters interpolation inside existing expression context, e.g. *ngIf="name {{ name }}"
d94d7b5
to
6a485bd
Compare
@atscott I updated my PR, I think it's ready for code review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change LGTM. In the future we may want to look into calling _checkNoInterpolation
in Parser.parseTemplateBindings
, similar to what is done for regular bindings, but that might have unforeseen consequences on existing code so let's get this change in.
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. |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Fixes #27740
What is the new behavior?
Compiler report proper "unexpected token" error.
Does this PR introduce a breaking change?
Other information