Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@JeanMeche
Copy link
Member

{{in}} are not interpreted as 'in' string expressions anymore.

fixes #65244

@JeanMeche JeanMeche added the action: global presubmit The PR is in need of a google3 global presubmit label Nov 17, 2025
@angular-robot angular-robot bot added the area: compiler Issues related to `ngc`, Angular's template compiler label Nov 17, 2025
@ngbot ngbot bot added this to the Backlog milestone Nov 17, 2025
`{{in}}` are not interpreted as `'in'` string expressions anymore.

fixes angular#65244
this.advance();
return new LiteralPrimitive(this.span(start), this.sourceSpan(start), false);
} else if (this.next.isKeywordIn()) {
} else if (this.next.isKeywordIn() && this.index > 0) {
Copy link
Member

Choose a reason for hiding this comment

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

I don't follow the rationale here, nor for the original code; why would in be tokenized as keyword, yet interpreted as string... string literals should be tokenized as-is, so keyword tokens shouldn't be parsed to string literals.

Making this conditional on token index makes this even weirder. Concretely, I don't expect multi-statement bindings in outputs to be handled correctly:

<a (click)="in; in"></a>

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

Labels

action: global presubmit The PR is in need of a google3 global presubmit area: compiler Issues related to `ngc`, Angular's template compiler

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Collision between expressions and template variable / class field

2 participants