Incorrect inlining within `with` statement
Open
bug
ecma262
- Dominant language
- JavaScript
- Stars
- 4.4k
- Forks
- 217
- PR merge metrics
- No merged PRs in 30d
Description
``` js
var x = 0;
var myObj = {x : "obj"};
function f1(){
var x = 1;
function f2(){
with(myObj){
return x;
}
};
return f2();
}
```
minfies to:
``` js
var x = 0,
myObj = { x: "obj" };
function f1() {
;
return function () {
with (myObj) {
return 1;
}
}();
}
```
This should be `return "obj"` not `return 1`
Contributor guide
Assessment
This issue has not been assessed yet.