I've noticed that the following code, after transpilation, fails to accurately reproduce behaviour (let's call it test.js):
for (var r = 0; r < 1; r++) {
let e = 1;
let o = 2;
switch (o) {
case 2:
let e = 4
console.log(e)
break;
}
console.log(e)
}
File after ./bin/buble test.js (master branch on buble, commit 1918c651a4c8e2220437ea3f5fe20d1baaa1865f)
for (var r = 0; r < 1; r++) {
var e = 1;
var o = 2;
switch (o) {
case 2:
var e$1 = 4
console.log(e$1)
break;
}
console.log(e$1)
}
Output of node test.js (node 8):
4
1
Output of ./bin/buble test.js | node - (node 8)
4
4
I noticed that the later reference to e, that should refer to that declared outside the switch statement is incorrectly replaced to a reference to that present inside the switch statement.
If you need more information on the issue, please ask away. Thanks.
Hi there,
I've noticed that the following code, after transpilation, fails to accurately reproduce behaviour (let's call it
test.js
):File after
./bin/buble test.js
(master
branch on buble, commit1918c651a4c8e2220437ea3f5fe20d1baaa1865f
)Output of
node test.js
(node 8):Output of
./bin/buble test.js | node -
(node 8)I noticed that the later reference to
e
, that should refer to that declared outside the switch statement is incorrectly replaced to a reference to that present inside the switch statement.If you need more information on the issue, please ask away. Thanks.