Skip to content

fix(compiler): throw on duplicate input/outputs#65952

Merged
thePunderWoman merged 1 commit intoangular:mainfrom
JeanMeche:compiler-duplicate-bindings
Feb 26, 2026
Merged

fix(compiler): throw on duplicate input/outputs#65952
thePunderWoman merged 1 commit intoangular:mainfrom
JeanMeche:compiler-duplicate-bindings

Conversation

@JeanMeche
Copy link
Member

@JeanMeche JeanMeche commented Dec 10, 2025

inputs & outputs cannot be binded to 2 different directives/components properties

Eg

data = model();
dataChange = output(); // throws because model already emits on the `dataChange` output

userSomething = input({alias 'user'});
user = input(); // throws because userSomething already binds to the `user` input

fixes #65844

BREAKING CHANGE: The compiler will throw when there a when inputs, outputs or model are binding to the same input/outputs.

@JeanMeche JeanMeche added the action: global presubmit The PR is in need of a google3 global presubmit label Dec 10, 2025
@angular-robot angular-robot bot added the area: compiler Issues related to `ngc`, Angular's template compiler label Dec 10, 2025
@ngbot ngbot bot added this to the Backlog milestone Dec 10, 2025
@JeanMeche JeanMeche force-pushed the compiler-duplicate-bindings branch 3 times, most recently from d1b82c3 to 0167460 Compare December 10, 2025 02:06
@JeanMeche JeanMeche modified the milestones: Backlog, v22 candidates Dec 12, 2025
@JeanMeche JeanMeche added the state: blocked on G3 cleanup This change requires a G3 cleanup label Dec 12, 2025
@JeanMeche JeanMeche force-pushed the compiler-duplicate-bindings branch from 0167460 to b04794e Compare December 12, 2025 05:55
@JeanMeche JeanMeche added the target: major This PR is targeted for the next major release label Jan 5, 2026
@JeanMeche JeanMeche force-pushed the compiler-duplicate-bindings branch from b04794e to 06136bb Compare January 9, 2026 04:31
@JeanMeche JeanMeche force-pushed the compiler-duplicate-bindings branch from 06136bb to 52f67b9 Compare February 18, 2026 12:54
@JeanMeche JeanMeche marked this pull request as ready for review February 18, 2026 12:54
@pullapprove pullapprove bot requested review from atscott and devversion February 18, 2026 12:54
inputs & outputs cannot be binded to 2 different directives/components properties

Eg
```
data = model();
dataChange = output(); // throws because model already emits on the `dataChange` output

userSomething = input({alias 'user'});
user = input(); // throws because userSomething already binds to the `user` input
````

fixes angular#65844

BREAKING CHANGE: The compiler will throw when there a when inputs, outputs or model are binding to the same input/outputs.
@JeanMeche JeanMeche force-pushed the compiler-duplicate-bindings branch from 52f67b9 to 79eca34 Compare February 20, 2026 12:41
@angular-robot angular-robot bot added the detected: breaking change PR contains a commit with a breaking change label Feb 20, 2026
@JeanMeche JeanMeche removed the state: blocked on G3 cleanup This change requires a G3 cleanup label Feb 24, 2026
@JeanMeche
Copy link
Member Author

G3 has been cleaned up.

Copy link
Contributor

@thePunderWoman thePunderWoman left a comment

Choose a reason for hiding this comment

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

reviewed-for: fw-compiler, public-api

@JeanMeche JeanMeche added action: merge The PR is ready for merge by the caretaker and removed action: global presubmit The PR is in need of a google3 global presubmit labels Feb 26, 2026
@thePunderWoman thePunderWoman merged commit 03db2ae into angular:main Feb 26, 2026
21 of 22 checks passed
@thePunderWoman
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 breaking changes detected: breaking change PR contains a commit with a breaking change target: major This PR is targeted for the next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

model's implicit output is overridden by an explicit output of the same name

3 participants