Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
58756e9
commit 4b893c3
Showing
10 changed files
with
92 additions
and
0 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
...el-plugin-transform-block-scoping/test/fixtures/tdz/function-call-recursive-after/exec.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,9 @@ | ||
expect(() => { | ||
function f(i) { | ||
if (i) f(i - 1); | ||
x; | ||
} | ||
|
||
let x; | ||
f(3); | ||
}).not.toThrow(); |
7 changes: 7 additions & 0 deletions
7
...l-plugin-transform-block-scoping/test/fixtures/tdz/function-call-recursive-after/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,7 @@ | ||
function f(i) { | ||
if (i) f(i - 1); | ||
x; | ||
} | ||
|
||
let x; | ||
f(3); |
7 changes: 7 additions & 0 deletions
7
...-plugin-transform-block-scoping/test/fixtures/tdz/function-call-recursive-after/output.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,7 @@ | ||
function f(i) { | ||
if (i) f(i - 1); | ||
x; | ||
} | ||
|
||
var x; | ||
f(3); |
9 changes: 9 additions & 0 deletions
9
...l-plugin-transform-block-scoping/test/fixtures/tdz/function-call-recursive-before/exec.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,9 @@ | ||
expect(() => { | ||
function f(i) { | ||
if (i) f(i - 1); | ||
x; | ||
} | ||
|
||
f(3); | ||
let x; | ||
}).toThrow(ReferenceError); |
7 changes: 7 additions & 0 deletions
7
...-plugin-transform-block-scoping/test/fixtures/tdz/function-call-recursive-before/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,7 @@ | ||
function f(i) { | ||
if (i) f(i - 1); | ||
x; | ||
} | ||
|
||
f(3); | ||
let x; |
7 changes: 7 additions & 0 deletions
7
...plugin-transform-block-scoping/test/fixtures/tdz/function-call-recursive-before/output.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,7 @@ | ||
function f(i) { | ||
if (i) f(i - 1); | ||
babelHelpers.tdz("x"); | ||
} | ||
|
||
f(3); | ||
var x; |
12 changes: 12 additions & 0 deletions
12
...lugin-transform-block-scoping/test/fixtures/tdz/function-call-recursive-reference/exec.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,12 @@ | ||
expect(() => { | ||
function f(i) { | ||
return () => { | ||
x; | ||
f(i - 1); | ||
}; | ||
} | ||
|
||
const g = f(1); | ||
let x; | ||
g(); | ||
}).not.toThrow(); |
10 changes: 10 additions & 0 deletions
10
...ugin-transform-block-scoping/test/fixtures/tdz/function-call-recursive-reference/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,10 @@ | ||
function f(i) { | ||
return () => { | ||
x; | ||
f(i - 1); | ||
}; | ||
} | ||
|
||
const g = f(1); | ||
let x; | ||
g(); |
12 changes: 12 additions & 0 deletions
12
...gin-transform-block-scoping/test/fixtures/tdz/function-call-recursive-reference/output.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,12 @@ | ||
var x = babelHelpers.temporalUndefined; | ||
|
||
function f(i) { | ||
return () => { | ||
babelHelpers.temporalRef(x, "x"); | ||
f(i - 1); | ||
}; | ||
} | ||
|
||
var g = f(1); | ||
x = void 0; | ||
g(); |
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