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
It should either pass r as second argument to the IIFE or it should not declare r as parameter of the inner function so that it references the variable in the outer scope. Currently r is always undefined at the destructuring
The text was updated successfully, but these errors were encountered:
ajafff
changed the title
Incorrect inlining of function with destructuring of computed key in for..of loop
Incorrect inlining of function with destructuring in initializer of for..of loop
Aug 8, 2022
Bug report or Feature request?
Bug
Version (complete output of
terser -V
or specific git commit)What the online REPL currently uses
Complete CLI command or
minify()
options usedREPL defaults:
terser
inputterser
output or errorExpected result
It should either pass
r
as second argument to the IIFE or it should not declarer
as parameter of the inner function so that it references the variable in the outer scope. Currentlyr
is alwaysundefined
at the destructuringNote that this only seems to happen with object destructuring in for..of loops
There's a similar case where the reference to the default value of a destructured property is not correctly tracked.
Input:
Output:
Same issue:
r
is alwaysundefined
The text was updated successfully, but these errors were encountered: