Skip to content

Commit c8a7cab

Browse files
committed
[compiler] Fix issue where second argument of all functions was considered to be a ref
ghstack-source-id: 1817f3b Pull Request resolved: #30912
1 parent 26855e4 commit c8a7cab

File tree

1 file changed

+1
-1
lines changed
  • compiler/packages/babel-plugin-react-compiler/src/TypeInference

1 file changed

+1
-1
lines changed

compiler/packages/babel-plugin-react-compiler/src/TypeInference/InferTypes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ function equation(left: Type, right: Type): TypeEquation {
107107
function* generate(
108108
func: HIRFunction,
109109
): Generator<TypeEquation, void, undefined> {
110-
if (func.env.fnType === 'Component') {
110+
if (func.fnType === 'Component') {
111111
const [props, ref] = func.params;
112112
if (props && props.kind === 'Identifier') {
113113
yield equation(props.identifier.type, {

0 commit comments

Comments
 (0)