From 3c16b1e2294c334e581d7d093c934ef79bde87db Mon Sep 17 00:00:00 2001 From: Mike Vitousek Date: Sat, 7 Sep 2024 17:49:39 -0700 Subject: [PATCH 1/2] [compiler] Fix issue where second argument of all functions was considered to be a ref [ghstack-poisoned] --- .../babel-plugin-react-compiler/src/TypeInference/InferTypes.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/packages/babel-plugin-react-compiler/src/TypeInference/InferTypes.ts b/compiler/packages/babel-plugin-react-compiler/src/TypeInference/InferTypes.ts index b460124ec71f3..25bc87838ae83 100644 --- a/compiler/packages/babel-plugin-react-compiler/src/TypeInference/InferTypes.ts +++ b/compiler/packages/babel-plugin-react-compiler/src/TypeInference/InferTypes.ts @@ -107,7 +107,7 @@ function equation(left: Type, right: Type): TypeEquation { function* generate( func: HIRFunction, ): Generator { - if (func.env.fnType === 'Component') { + if (func.fnType === 'Component') { const [props, ref] = func.params; if (props && props.kind === 'Identifier') { yield equation(props.identifier.type, { From 34d096f0c844bb07712cbb37be5dc09452bab2e0 Mon Sep 17 00:00:00 2001 From: Mike Vitousek Date: Sun, 8 Sep 2024 11:44:25 -0700 Subject: [PATCH 2/2] Update on "[compiler] Fix issue where second argument of all functions was considered to be a ref" [ghstack-poisoned]