1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00

Fix #4111 - ensure Closure::__invoke doesn’t break things

This commit is contained in:
Brown 2020-09-03 00:13:03 -04:00
parent bd27e8b17b
commit a4d6a845f8

View File

@ -311,6 +311,10 @@ class CallableTypeComparator
// do nothing
}
}
} elseif ($input_type_part instanceof TNamedObject
&& $input_type_part->value === 'Closure'
) {
return new TCallable();
} elseif ($input_type_part instanceof TNamedObject
&& $codebase->classExists($input_type_part->value)
) {