You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class C {
foo(arg1, arg2) {
[arg1, arg2] = [arg2, arg1];
return arg1;
}
}
Expected behavior:
I would expect any temporary variable declaration to be inserted before use (in this case _a).
I would certainly not expect it after a return statement , giving unreachable code.
Actual behavior:
var C = (function () {
function C() {
}
C.prototype.foo = function (arg1, arg2) {
_a = [arg2, arg1], arg1 = _a[0], arg2 = _a[1];
return arg1;
var _a;
};
return C;
}());
The text was updated successfully, but these errors were encountered:
Code
playground
class C {
foo(arg1, arg2) {
[arg1, arg2] = [arg2, arg1];
return arg1;
}
}
Expected behavior:
I would expect any temporary variable declaration to be inserted before use (in this case _a).
I would certainly not expect it after a return statement , giving unreachable code.
Actual behavior:
var C = (function () {
function C() {
}
C.prototype.foo = function (arg1, arg2) {
_a = [arg2, arg1], arg1 = _a[0], arg2 = _a[1];
return arg1;
var _a;
};
return C;
}());
The text was updated successfully, but these errors were encountered: