Open trueadm opened 6 years ago
This seems to be some kind of interaction between optimizing nested functions and joining the state of the local variables of module.
Passes on master.
if it passes on master, is there a missing test that should be added? or is the internal test difficult to reduce?
Here's a strange issue that I've been running into with the React Native bundle. Our module system initializes and when doing so, can run into cases where there's an abstract conditional that might throw. The throw seems to break the execution flow for function constructors, something that shouldn't happen.
Here's a repro:
When we get to
var instance = new Component();
. Prepack wrongly thinks thatComponent
is a conditional abstract value ofundefined | Constructor
, because of the above throw. This results in bailing out and the code never inlining – something that break the React reconciler when dealing with React class components (we don't support conditional constructors).