1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 04:45:20 +01:00

Fix comparison

This commit is contained in:
Matthew Brown 2020-01-07 02:24:21 -05:00
parent 1f777bec0e
commit 8f3d325bbc

View File

@ -1916,7 +1916,9 @@ class AssertionReconciler extends \Psalm\Type\Reconciler
&& $codebase->methodExists($type->value . '::__invoke')
) {
$callable_types[] = $type;
} elseif (get_class($type) === TString::class) {
} elseif (get_class($type) === TString::class
|| get_class($type) === Type\Atomic\TNonEmptyString::class
) {
$callable_types[] = new Type\Atomic\TCallableString();
$did_remove_type = true;
} elseif (get_class($type) === Type\Atomic\TLiteralString::class