Skip to content

Commit e6fabaa

Browse files
[compiler] Correctly insert (Arrow)FunctionExpressions
Previously we would insert new (Arrow)FunctionExpressions as a sibling of the original function. However this would break in the outlining case as it would cause the original function expression's parent to become a SequenceExpression, breaking a bunch of assumptions in the babel plugin. To get around this, we synthesize a new VariableDeclaration to contain the newly inserted function expression and therefore insert it as a true sibling to the original function. Yeah, it's kinda gross ghstack-source-id: df13e3b Pull Request resolved: facebook#30446
1 parent a6b7e43 commit e6fabaa

File tree

1 file changed

+271
-255
lines changed

1 file changed

+271
-255
lines changed

0 commit comments

Comments
 (0)