handle ReturnStatements in block binding - closes #24
This commit is contained in:
16
test/fixtures/block-binding/return/actual.js
vendored
Normal file
16
test/fixtures/block-binding/return/actual.js
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
function student () {
|
||||
let isStudent = true;
|
||||
return Object.freeze({
|
||||
isStudent
|
||||
});
|
||||
}
|
||||
|
||||
function student () {
|
||||
let isStudent = true;
|
||||
while (true) {
|
||||
let test = "foo";
|
||||
return Object.freeze({
|
||||
isStudent
|
||||
});
|
||||
}
|
||||
}
|
||||
14
test/fixtures/block-binding/return/expected.js
vendored
Normal file
14
test/fixtures/block-binding/return/expected.js
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
function student() {
|
||||
var isStudent = true;
|
||||
return Object.freeze({ isStudent: isStudent });
|
||||
}
|
||||
|
||||
function student() {
|
||||
var isStudent = true;
|
||||
while (true) {
|
||||
return function () {
|
||||
var test = 'foo';
|
||||
return Object.freeze({ isStudent: isStudent });
|
||||
}();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user