fix(compiler): type-checking error for duplicate variables in templates (#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
This commit is contained in:
Alex Rickabaugh
2020-02-25 14:48:30 -08:00
committed by atscott
parent 1f8a243b67
commit 2c41bb8490
6 changed files with 83 additions and 0 deletions

View File

@ -30,5 +30,6 @@ export declare enum ErrorCode {
MISSING_REFERENCE_TARGET = 8003,
MISSING_PIPE = 8004,
WRITE_TO_READ_ONLY_VARIABLE = 8005,
DUPLICATE_VARIABLE_DECLARATION = 8006,
INJECTABLE_DUPLICATE_PROV = 9001
}