fix(replaceWith): _removeFromScope first if necessary#14883
fix(replaceWith): _removeFromScope first if necessary#14883jedwards1211 wants to merge 1 commit intobabel:mainfrom
Conversation
|
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/52802/ |
38fc929 to
aed6ab3
Compare
|
CI errors are related. |
|
@liuxingbaoyu what are the current issues with One problem I see with my current PR is assertions in Do you have any hunch why removing bindings from the scope is causing regressions like this? I would think the extraneous variable |
|
#14430 |
|
Yeah I was just going through in the debugger and saw with my own eyes how |
|
I'm surprised the dangling bindings after replacement apparently aren't causing loads of other problems |
|
There are some reports of this, but most circumvent the problem by doing it manually. |
aed6ab3 to
6579dee
Compare
fix #14881
In
replaceWith, I first_removeFromScope()(unless innoScopemode) so that dangling bindings won't be left over (and potentially conflict with the replacement).We'll need to make the same change to other replacement methods, I suspect