Hey Tim,

On Tue, 26 Nov 2024 at 10:50, Tim Düsterhus <t...@bastelstu.be> wrote:

> Hi
>
> Am 2024-11-26 10:40, schrieb Eugene Sidelnyk:
> > I think it would make sense to change the signature of iterator_count
> > to
> > accept iterable rather than array|Traversable so that static analysis
> > tools
> > would pick it up better
>
> That sounds like a bug in Psalm's understanding of union types. PHPStan
> handles it just fine:
> https://phpstan.org/r/8604ef1d-3500-4695-8c23-bb5d30ce4268
>

Is `Traversable|array` an alias of `iterable`? Is it **always** like that?

Marco Pivetta

https://mastodon.social/@ocramius

https://ocramius.github.io/

Reply via email to