[compiler] Fix issue where second argument of all functions was considered to be a ref

ghstack-source-id: bd5f7b9f39
Pull Request resolved: https://github.com/facebook/react/pull/30912
This commit is contained in:
Mike Vitousek
2024-09-07 17:49:43 -07:00
parent 727b361528
commit e1d6d0eada
@@ -107,7 +107,7 @@ function equation(left: Type, right: Type): TypeEquation {
function* generate(
func: HIRFunction,
): Generator<TypeEquation, void, undefined> {
if (func.env.fnType === 'Component') {
if (func.fnType === 'Component') {
const [props, ref] = func.params;
if (props && props.kind === 'Identifier') {
yield equation(props.identifier.type, {