Disallow "let" as name at lexical bindings (#10099)

* Disallow "let" as name at lexical bindings

* Simplify

* Clean up
This commit is contained in:
Pig Fang
2019-06-19 05:17:00 +08:00
committed by Nicolò Ribaudo
parent 505b2cc18d
commit 11fa2461ce
14 changed files with 31 additions and 4 deletions

View File

@@ -0,0 +1 @@
let { let } = {};

View File

@@ -0,0 +1,3 @@
{
"throws": "'let' is not allowed to be used as a name in 'let' or 'const' declarations. (1:6)"
}

View File

@@ -0,0 +1 @@
const { let } = {};

View File

@@ -0,0 +1,3 @@
{
"throws": "'let' is not allowed to be used as a name in 'let' or 'const' declarations. (1:8)"
}

View File

@@ -0,0 +1 @@
let [let] = [];

View File

@@ -0,0 +1,3 @@
{
"throws": "'let' is not allowed to be used as a name in 'let' or 'const' declarations. (1:5)"
}

View File

@@ -0,0 +1 @@
const [let] = [];

View File

@@ -0,0 +1,3 @@
{
"throws": "'let' is not allowed to be used as a name in 'let' or 'const' declarations. (1:7)"
}

View File

@@ -0,0 +1 @@
let let

View File

@@ -0,0 +1,3 @@
{
"throws": "'let' is not allowed to be used as a name in 'let' or 'const' declarations. (1:4)"
}

View File

@@ -0,0 +1 @@
const let = ''

View File

@@ -0,0 +1,3 @@
{
"throws": "'let' is not allowed to be used as a name in 'let' or 'const' declarations. (1:6)"
}