Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disallow "let" as name at lexical bindings (#10099)
* Disallow "let" as name at lexical bindings * Simplify * Clean up
- Loading branch information
1 parent
505b2cc
commit 11fa246
Showing
14 changed files
with
31 additions
and
4 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
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
1 change: 1 addition & 0 deletions
1
packages/babel-parser/test/fixtures/es2015/let/let-at-binding-list-fail-1/input.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 @@ | ||
let { let } = {}; |
3 changes: 3 additions & 0 deletions
3
packages/babel-parser/test/fixtures/es2015/let/let-at-binding-list-fail-1/options.json
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,3 @@ | ||
{ | ||
"throws": "'let' is not allowed to be used as a name in 'let' or 'const' declarations. (1:6)" | ||
} |
1 change: 1 addition & 0 deletions
1
packages/babel-parser/test/fixtures/es2015/let/let-at-binding-list-fail-2/input.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 @@ | ||
const { let } = {}; |
3 changes: 3 additions & 0 deletions
3
packages/babel-parser/test/fixtures/es2015/let/let-at-binding-list-fail-2/options.json
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,3 @@ | ||
{ | ||
"throws": "'let' is not allowed to be used as a name in 'let' or 'const' declarations. (1:8)" | ||
} |
1 change: 1 addition & 0 deletions
1
packages/babel-parser/test/fixtures/es2015/let/let-at-binding-list-fail-3/input.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 @@ | ||
let [let] = []; |
3 changes: 3 additions & 0 deletions
3
packages/babel-parser/test/fixtures/es2015/let/let-at-binding-list-fail-3/options.json
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,3 @@ | ||
{ | ||
"throws": "'let' is not allowed to be used as a name in 'let' or 'const' declarations. (1:5)" | ||
} |
1 change: 1 addition & 0 deletions
1
packages/babel-parser/test/fixtures/es2015/let/let-at-binding-list-fail-4/input.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 @@ | ||
const [let] = []; |
3 changes: 3 additions & 0 deletions
3
packages/babel-parser/test/fixtures/es2015/let/let-at-binding-list-fail-4/options.json
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,3 @@ | ||
{ | ||
"throws": "'let' is not allowed to be used as a name in 'let' or 'const' declarations. (1:7)" | ||
} |
1 change: 1 addition & 0 deletions
1
packages/babel-parser/test/fixtures/es2015/let/let-at-binding-list-fail-5/input.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 @@ | ||
let let |
3 changes: 3 additions & 0 deletions
3
packages/babel-parser/test/fixtures/es2015/let/let-at-binding-list-fail-5/options.json
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,3 @@ | ||
{ | ||
"throws": "'let' is not allowed to be used as a name in 'let' or 'const' declarations. (1:4)" | ||
} |
1 change: 1 addition & 0 deletions
1
packages/babel-parser/test/fixtures/es2015/let/let-at-binding-list-fail-6/input.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 @@ | ||
const let = '' |
3 changes: 3 additions & 0 deletions
3
packages/babel-parser/test/fixtures/es2015/let/let-at-binding-list-fail-6/options.json
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,3 @@ | ||
{ | ||
"throws": "'let' is not allowed to be used as a name in 'let' or 'const' declarations. (1:6)" | ||
} |