Skip to content

fix(compiler-cli): update diagnostic to flag no-op arrow functions in listeners#66926

Merged
AndrewKushnir merged 1 commit intoangular:mainfrom
crisbeto:arrow-function-event-listener
Feb 6, 2026
Merged

fix(compiler-cli): update diagnostic to flag no-op arrow functions in listeners#66926
AndrewKushnir merged 1 commit intoangular:mainfrom
crisbeto:arrow-function-event-listener

Conversation

@crisbeto
Copy link
Member

@crisbeto crisbeto commented Feb 5, 2026

Based on the discussion in #66294: now that we support arrow functions in event listeners, developers may write out something like (click)="() => expr" which will be a no-op. These changes update the existing diagnostic for uninvoked expressions in listeners to account for it.

… listeners

Based on the discussion in angular#66294: now that we support arrow functions in event listeners, developers may write out something like `(click)="() => expr"` which will be a no-op. These changes update the existing diagnostic for uninvoked expressions in listeners to account for it.
@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 Feb 5, 2026
@angular-robot angular-robot bot added the area: compiler Issues related to `ngc`, Angular's template compiler label Feb 5, 2026
@ngbot ngbot bot added this to the Backlog milestone Feb 5, 2026
@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 Feb 5, 2026
@AndrewKushnir AndrewKushnir merged commit 2ea6dfc into angular:main Feb 6, 2026
24 checks passed
@AndrewKushnir
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: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants