-
Notifications
You must be signed in to change notification settings - Fork 27k
Closed
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: compilerIssues related to `ngc`, Angular's template compilerIssues related to `ngc`, Angular's template compilerbugcompiler: parsercore: control flowIssues related to the built-in control flow (@if, @for, @switch)Issues related to the built-in control flow (@if, @for, @switch)
Milestone
Description
I had the pleasure to code review this today:
<!-- part of a component template: -->
@if (foo; as var && !bar) {
if is true
}This was a result of copy/pasta and trying to modify it. The suspect thought, that !bar was part of the condition and didn't notice the as var in between.
Expected:
- angular compiler error:
var && !barinvalid afteras - angular warning:
varunused
Actual:
- no warnings at all
Please provide a link to a minimal reproduction of the bug
https://stackblitz.com/edit/bolt-angular-pwljvmk3?file=src%2Fmain.ts
Metadata
Metadata
Assignees
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: compilerIssues related to `ngc`, Angular's template compilerIssues related to `ngc`, Angular's template compilerbugcompiler: parsercore: control flowIssues related to the built-in control flow (@if, @for, @switch)Issues related to the built-in control flow (@if, @for, @switch)