dillon1000/react
Commit
Browse files [hir] Attach fnType to HIRFunction
---
(This came out of running a sync and observing hundreds of bailouts due from
this validation)
Reading `fnType` from environment overgeneralizes, as inner functions are
usually not the type of the outer react function.
```
// Component type
function Component() {
// not Component type
const helper = () => {...};
}
```
Let's attach fnType to `HIRFunction` and use that for our inference +
validationsChanged paths5 files
First-parent comparisoncompiler/packages/babel-plugin-react-forget/src/HIR/BuildHIR.ts ModifiedM compiler/packages/babel-plugin-react-forget/src/HIR/HIR.ts ModifiedM compiler/packages/babel-plugin-react-forget/src/Inference/InferReferenceEffects.ts ModifiedA compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/component-inner-function-with-many-args.expect.md AddedA compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/component-inner-function-with-many-args.tsx AddedPatch
Files changed
Rendering syntax-highlighted changes…