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:
parent
5a64e97f0f
commit
afc2f18d18
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user