You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
INFO: [LessSpecificReturnStatement](https://psalm.dev/129) - 32:12 - The type 'array{0: 0, 2: 2}' is more general than the declared return type 'list<int>' for takesAnInt4
INFO: [MoreSpecificReturnType](https://psalm.dev/070) - 27:12 - The declared return type 'list<int>' for takesAnInt4 is more specific than the inferred return type 'array{0: 0, 2: 2}'
But function 2 actually returns string keys as well:
Sample
Psalm output
Only function 4 warns you:
But function 2 actually returns string keys as well:
I think we should therefore try to discourage using
array<int, …>
as API return because it's mostlikely a lie 🍰The text was updated successfully, but these errors were encountered: