Skip to content

Commit

Permalink
Merge pull request #259 from eslint/issue149
Browse files Browse the repository at this point in the history
Fix: Ensure 'var let' works (fixes #149)
  • Loading branch information
nzakas committed Mar 14, 2016
2 parents 71ccb8f + a2b23ca commit 11f702c
Show file tree
Hide file tree
Showing 5 changed files with 479 additions and 1 deletion.
185 changes: 185 additions & 0 deletions tests/fixtures/ecma-version/6/edge-cases/var-let-declaration.result.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
module.exports = {
"type": "Program",
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 12
}
},
"range": [
0,
12
],
"body": [
{
"type": "VariableDeclaration",
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 12
}
},
"range": [
0,
12
],
"declarations": [
{
"type": "VariableDeclarator",
"loc": {
"start": {
"line": 1,
"column": 4
},
"end": {
"line": 1,
"column": 11
}
},
"range": [
4,
11
],
"id": {
"type": "Identifier",
"loc": {
"start": {
"line": 1,
"column": 4
},
"end": {
"line": 1,
"column": 7
}
},
"range": [
4,
7
],
"name": "let"
},
"init": {
"type": "Identifier",
"loc": {
"start": {
"line": 1,
"column": 10
},
"end": {
"line": 1,
"column": 11
}
},
"range": [
10,
11
],
"name": "a"
}
}
],
"kind": "var"
}
],
"sourceType": "script",
"tokens": [
{
"type": "Keyword",
"value": "var",
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 3
}
},
"range": [
0,
3
]
},
{
"type": "Keyword",
"value": "let",
"loc": {
"start": {
"line": 1,
"column": 4
},
"end": {
"line": 1,
"column": 7
}
},
"range": [
4,
7
]
},
{
"type": "Punctuator",
"value": "=",
"loc": {
"start": {
"line": 1,
"column": 8
},
"end": {
"line": 1,
"column": 9
}
},
"range": [
8,
9
]
},
{
"type": "Identifier",
"value": "a",
"loc": {
"start": {
"line": 1,
"column": 10
},
"end": {
"line": 1,
"column": 11
}
},
"range": [
10,
11
]
},
{
"type": "Punctuator",
"value": ";",
"loc": {
"start": {
"line": 1,
"column": 11
},
"end": {
"line": 1,
"column": 12
}
},
"range": [
11,
12
]
}
]
};
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
var let = a;

0 comments on commit 11f702c

Please sign in to comment.