JS: when resolving temporary functions, don't rely on JsScope hierarchy, build this hierarchy instead, based on scoping rules for function, var, etc expressions
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
function foo() {
|
||||
x: {
|
||||
x_0: {
|
||||
console.log("1");
|
||||
console.log(function() {
|
||||
x: {
|
||||
console.log("2");
|
||||
}
|
||||
});
|
||||
|
||||
if (condition()) {
|
||||
break x;
|
||||
}
|
||||
else {
|
||||
break x_0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
x: {
|
||||
x_0: {
|
||||
console.log("1");
|
||||
}
|
||||
x_0: {
|
||||
console.log("1");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user