this and arguments inside of a block scoped loop are incorrect
They'll refer to their closure instead.
for (let i = 0;;) {
this;
arguments;
(function () { i })();
}
produces:
var forLoop = function ( i ) {
this;
arguments;
(function () { i })();
};
for (var i = 0;;) forLoop( i );
When it should produce something like:
var _this = this;
var _arguments = arguments;
var forLoop = function ( i ) {
_this;
_arguments;
(function () { i })();
};
for (var i = 0;;) forLoop( i );