packages/babel-plugin-transform-block-scoping/test/fixtures/general/issue-4363/input.js
raw symbols SCIP| 1 | function WithoutCurlyBraces() { |
| 2 | if (true) |
| 3 | for (let k in kv) { |
| 4 | function foo() { return this } |
| 5 | function bar() { return foo.call(this) } |
| 6 | console.log(this, k) // => undefined |
| 7 | } |
| 8 | } |
| 9 | |
| 10 | function WithCurlyBraces() { |
| 11 | if (true) { |
| 12 | for (let k in kv) { |
| 13 | function foo() { return this } |
| 14 | function bar() { return foo.call(this) } |
| 15 | console.log(this, k) // => 777 |
| 16 | } |
| 17 | } |
| 18 | } |