Getting "Cannot determine the type of the object" for this method:
/**
* @return \Traversable|HasErrorCode[]
*/
public function getMessages();
Example: https://getpsalm.org/r/ef4492f426
$ php vendor/bin/psalm -v
Psalm 3.0.15@c310a2dd86660944b3f15fb8486ab73d45066618
$ grep Gene psalm.xml
allowPhpStormGenerics="true"
(Were they working before? I don't know.)
Workaround is to use @return \Traversable|HasErrorCode[]|\Traversable<HasErrorCode>, but shouldn't it be working as it is? Demo with this workaround.
+1, same issue for me
It was definitely working before - Psalm is collapsing Traversable|array into iterable, but it shouldn't _if_ the config flag is on and the Traversable is also in the return param hint
I'll release a build with this
Most helpful comment
https://github.com/vimeo/psalm/releases/tag/3.0.16