Open Jean85 opened 2 years ago
I found these snippets:
You can of course use array{0: Foo::*}
to work around the issue until it's fixed.
Your return could probably be better described as non-empty-array<Foo::*>
or even non-empty-list<Foo::*>
if the position is not important
You can of course use
array{0: Foo::*}
to work around the issue until it's fixed.
Thanks for the tip, I can confirm that this workaround works
Your return could probably be better described as
non-empty-array<Foo::*>
or evennon-empty-list<Foo::*>
if the position is not important
Unfortunately for me, position counts in this case.
I found these snippets:
The parser for array shapes mistakenly thinks that
::
is used as an array key and not as a value:https://psalm.dev/r/45e90ce53a
Issue is located in this piece of code: https://github.com/vimeo/psalm/blob/c74981127fcd83a3a1b6ff65d7cb8b7bdeb85017/src/Psalm/Internal/Type/ParseTreeCreator.php#L783-L793