mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
[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:
@@ -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, {
|
||||
|
||||
Reference in New Issue
Block a user