Files
kotlin-fork/js/js.translator/testData/js-optimizer/temporary-variable/assignmentToOuterVar.optimized.js
T
Alexey Andreev d89ce80d97 Fix temporary variable elimination in JS BE
Don't eliminate temporary variable when between its usage and its
definition there's assignment to a non-local variable.

Fix KT-17540
2017-04-28 10:51:30 +03:00

11 lines
150 B
JavaScript
Vendored

var value = "OK";
function foo(newValue) {
var $tmp = value;
value = newValue;
return $tmp;
}
function box() {
return foo("fail");
}