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
The expected result is 4, but this will result in 2.
Fixing this will require tracking non-static assignments and bailing on resolving directly to variables instead of member expressions. The linker could replace static variable accesses with member expressions again if there is metadata indicating that a non-static assignment occurred (stored by the hoister).
Hmm actually tracking this may be very difficult especially if the require result is assigned to the value of another variable or passed into a function. We may need to bail in any cases where the require is accessed non-statically, not just on assignments.
🐛 bug report
This code:
produces this:
The expected result is 4, but this will result in 2.
Fixing this will require tracking non-static assignments and bailing on resolving directly to variables instead of member expressions. The linker could replace static variable accesses with member expressions again if there is metadata indicating that a non-static assignment occurred (stored by the hoister).
The text was updated successfully, but these errors were encountered: