JS: when removing unused temporary variable, process its RHS value. Fix KT-15325
This commit is contained in:
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
var log = "";
|
||||
|
||||
function test(a) {
|
||||
var $tmp1;
|
||||
log += $tmp1 = 1;
|
||||
return a;
|
||||
}
|
||||
|
||||
function box() {
|
||||
if (test(3) != 3) return "fail1";
|
||||
if (log != 1) return "fail2";
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user