1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-21 21:31:13 +01:00

Allow ImplicitToStringCast when sending an object to scalar-accepting param

This commit is contained in:
Matthew Brown 2019-06-15 12:11:42 -04:00
parent 5a64e97f0f
commit afc2f18d18

View File

@ -1188,7 +1188,7 @@ class TypeAnalyzer
return false;
}
if ($container_type_part instanceof TString
if (($container_type_part instanceof TString || $container_type_part instanceof TScalar)
&& $input_type_part instanceof TNamedObject
) {
// check whether the object has a __toString method