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

Skip to content

fix(ivy): type-checking error for duplicate variables in templates #35674

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

Closed
wants to merge 1 commit into from

Conversation

alxhub
Copy link
Member

@alxhub alxhub commented Feb 25, 2020

It's an error to declare a variable twice on a specific template:

<div *ngFor="let i of items; let i = index">
</div>

This commit introduces a template type-checking error which helps to detect
and diagnose this problem.

Fixes #35186

@pullapprove pullapprove bot requested review from IgorMinar and JoostK February 25, 2020 22:51
@alxhub alxhub added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release labels Feb 25, 2020
@alxhub
Copy link
Member Author

alxhub commented Feb 25, 2020

Presubmit

@alxhub alxhub force-pushed the ngtsc/ttc/dup-id-error branch 2 times, most recently from 19c7238 to b9534f3 Compare February 26, 2020 17:40
Copy link
Contributor

@petebacondarwin petebacondarwin left a comment

Choose a reason for hiding this comment

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

Nice work @alxhub - it is very satisfying when the architecture of the code allows a change to be effected with so little churn!
A couple of suggestions.

@petebacondarwin petebacondarwin added the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label Feb 26, 2020
@mhevery mhevery added the area: compiler Issues related to `ngc`, Angular's template compiler label Feb 27, 2020
@ngbot ngbot bot added this to the needsTriage milestone Feb 27, 2020
@alxhub alxhub force-pushed the ngtsc/ttc/dup-id-error branch 2 times, most recently from 8831a75 to 6445a96 Compare March 2, 2020 22:45
@alxhub alxhub removed the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label Mar 2, 2020
@alxhub alxhub removed the request for review from IgorMinar March 2, 2020 22:45
@pullapprove pullapprove bot requested a review from IgorMinar March 2, 2020 22:46
@alxhub alxhub force-pushed the ngtsc/ttc/dup-id-error branch from 6445a96 to d453196 Compare March 3, 2020 17:46
It's an error to declare a variable twice on a specific template:

```html
<div *ngFor="let i of items; let i = index">
</div>
```

This commit introduces a template type-checking error which helps to detect
and diagnose this problem.

Fixes angular#35186
@alxhub alxhub force-pushed the ngtsc/ttc/dup-id-error branch from d453196 to 49c300b Compare March 3, 2020 18:39
@atscott atscott closed this in 2c41bb8 Mar 3, 2020
atscott pushed a commit that referenced this pull request Mar 3, 2020
…es (#35674)

It's an error to declare a variable twice on a specific template:

```html
<div *ngFor="let i of items; let i = index">
</div>
```

This commit introduces a template type-checking error which helps to detect
and diagnose this problem.

Fixes #35186

PR Close #35674
atscott added a commit to atscott/angular that referenced this pull request Mar 3, 2020
… templates (angular#35674)"

This reverts commit 1207295. Since this
is a new error, it should not go into the patch branch.
Copy link
Contributor

@IgorMinar IgorMinar left a comment

Choose a reason for hiding this comment

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

lgtm - post submit. let's please not submit unreviewed PRs in the future.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Apr 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: compiler Issues related to `ngc`, Angular's template compiler cla: yes target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Better error handling for template variable redefinitions
6 participants