-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure duplicate let/const declarations accross files are reported
- Loading branch information
Showing
19 changed files
with
187 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
tests/baselines/reference/letDeclarations-scopes-duplicates2.errors.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
tests/cases/compiler/file2.ts(1,5): error TS2300: Duplicate identifier 'var1'. | ||
|
||
|
||
==== tests/cases/compiler/file1.ts (0 errors) ==== | ||
|
||
let var1 = 0; | ||
|
||
==== tests/cases/compiler/file2.ts (1 errors) ==== | ||
let var1 = 0; | ||
~~~~ | ||
!!! error TS2300: Duplicate identifier 'var1'. |
13 changes: 13 additions & 0 deletions
13
tests/baselines/reference/letDeclarations-scopes-duplicates2.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
//// [tests/cases/compiler/letDeclarations-scopes-duplicates2.ts] //// | ||
|
||
//// [file1.ts] | ||
|
||
let var1 = 0; | ||
|
||
//// [file2.ts] | ||
let var1 = 0; | ||
|
||
//// [file1.js] | ||
let var1 = 0; | ||
//// [file2.js] | ||
let var1 = 0; |
11 changes: 11 additions & 0 deletions
11
tests/baselines/reference/letDeclarations-scopes-duplicates3.errors.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
tests/cases/compiler/file2.ts(1,7): error TS2300: Duplicate identifier 'var1'. | ||
|
||
|
||
==== tests/cases/compiler/file1.ts (0 errors) ==== | ||
|
||
let var1 = 0; | ||
|
||
==== tests/cases/compiler/file2.ts (1 errors) ==== | ||
const var1 = 0; | ||
~~~~ | ||
!!! error TS2300: Duplicate identifier 'var1'. |
13 changes: 13 additions & 0 deletions
13
tests/baselines/reference/letDeclarations-scopes-duplicates3.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
//// [tests/cases/compiler/letDeclarations-scopes-duplicates3.ts] //// | ||
|
||
//// [file1.ts] | ||
|
||
let var1 = 0; | ||
|
||
//// [file2.ts] | ||
const var1 = 0; | ||
|
||
//// [file1.js] | ||
let var1 = 0; | ||
//// [file2.js] | ||
const var1 = 0; |
11 changes: 11 additions & 0 deletions
11
tests/baselines/reference/letDeclarations-scopes-duplicates4.errors.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
tests/cases/compiler/file2.ts(1,5): error TS2300: Duplicate identifier 'var1'. | ||
|
||
|
||
==== tests/cases/compiler/file1.ts (0 errors) ==== | ||
|
||
const var1 = 0; | ||
|
||
==== tests/cases/compiler/file2.ts (1 errors) ==== | ||
let var1 = 0; | ||
~~~~ | ||
!!! error TS2300: Duplicate identifier 'var1'. |
13 changes: 13 additions & 0 deletions
13
tests/baselines/reference/letDeclarations-scopes-duplicates4.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
//// [tests/cases/compiler/letDeclarations-scopes-duplicates4.ts] //// | ||
|
||
//// [file1.ts] | ||
|
||
const var1 = 0; | ||
|
||
//// [file2.ts] | ||
let var1 = 0; | ||
|
||
//// [file1.js] | ||
const var1 = 0; | ||
//// [file2.js] | ||
let var1 = 0; |
11 changes: 11 additions & 0 deletions
11
tests/baselines/reference/letDeclarations-scopes-duplicates5.errors.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
tests/cases/compiler/file2.ts(1,7): error TS2300: Duplicate identifier 'var1'. | ||
|
||
|
||
==== tests/cases/compiler/file1.ts (0 errors) ==== | ||
|
||
const var1 = 0; | ||
|
||
==== tests/cases/compiler/file2.ts (1 errors) ==== | ||
const var1 = 0; | ||
~~~~ | ||
!!! error TS2300: Duplicate identifier 'var1'. |
13 changes: 13 additions & 0 deletions
13
tests/baselines/reference/letDeclarations-scopes-duplicates5.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
//// [tests/cases/compiler/letDeclarations-scopes-duplicates5.ts] //// | ||
|
||
//// [file1.ts] | ||
|
||
const var1 = 0; | ||
|
||
//// [file2.ts] | ||
const var1 = 0; | ||
|
||
//// [file1.js] | ||
const var1 = 0; | ||
//// [file2.js] | ||
const var1 = 0; |
11 changes: 11 additions & 0 deletions
11
tests/baselines/reference/letDeclarations-scopes-duplicates6.errors.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
tests/cases/compiler/file2.ts(1,5): error TS2300: Duplicate identifier 'var1'. | ||
|
||
|
||
==== tests/cases/compiler/file1.ts (0 errors) ==== | ||
|
||
var var1 = 0; | ||
|
||
==== tests/cases/compiler/file2.ts (1 errors) ==== | ||
let var1 = 0; | ||
~~~~ | ||
!!! error TS2300: Duplicate identifier 'var1'. |
13 changes: 13 additions & 0 deletions
13
tests/baselines/reference/letDeclarations-scopes-duplicates6.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
//// [tests/cases/compiler/letDeclarations-scopes-duplicates6.ts] //// | ||
|
||
//// [file1.ts] | ||
|
||
var var1 = 0; | ||
|
||
//// [file2.ts] | ||
let var1 = 0; | ||
|
||
//// [file1.js] | ||
var var1 = 0; | ||
//// [file2.js] | ||
let var1 = 0; |
11 changes: 11 additions & 0 deletions
11
tests/baselines/reference/letDeclarations-scopes-duplicates7.errors.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
tests/cases/compiler/file2.ts(1,5): error TS2300: Duplicate identifier 'var1'. | ||
|
||
|
||
==== tests/cases/compiler/file1.ts (0 errors) ==== | ||
|
||
let var1 = 0; | ||
|
||
==== tests/cases/compiler/file2.ts (1 errors) ==== | ||
var var1 = 0; | ||
~~~~ | ||
!!! error TS2300: Duplicate identifier 'var1'. |
13 changes: 13 additions & 0 deletions
13
tests/baselines/reference/letDeclarations-scopes-duplicates7.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
//// [tests/cases/compiler/letDeclarations-scopes-duplicates7.ts] //// | ||
|
||
//// [file1.ts] | ||
|
||
let var1 = 0; | ||
|
||
//// [file2.ts] | ||
var var1 = 0; | ||
|
||
//// [file1.js] | ||
let var1 = 0; | ||
//// [file2.js] | ||
var var1 = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// @target: ES6 | ||
|
||
// @Filename: file1.ts | ||
let var1 = 0; | ||
|
||
// @Filename: file2.ts | ||
let var1 = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// @target: ES6 | ||
|
||
// @Filename: file1.ts | ||
let var1 = 0; | ||
|
||
// @Filename: file2.ts | ||
const var1 = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// @target: ES6 | ||
|
||
// @Filename: file1.ts | ||
const var1 = 0; | ||
|
||
// @Filename: file2.ts | ||
let var1 = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// @target: ES6 | ||
|
||
// @Filename: file1.ts | ||
const var1 = 0; | ||
|
||
// @Filename: file2.ts | ||
const var1 = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// @target: ES6 | ||
|
||
// @Filename: file1.ts | ||
var var1 = 0; | ||
|
||
// @Filename: file2.ts | ||
let var1 = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// @target: ES6 | ||
|
||
// @Filename: file1.ts | ||
let var1 = 0; | ||
|
||
// @Filename: file2.ts | ||
var var1 = 0; |