Open bkdotcom opened 8 months ago
I found these snippets:
This would require a specific return type provider. Currently we only have a generic stub for array_intersect_key()
: https://github.com/vimeo/psalm/blob/62b525993d6091c8c2b95bfdc0b70a4e077e6f1e/stubs/CoreGenericFunctions.phpstub#L30-L42
https://psalm.dev/r/16ba5c2e38
It knows the values are
'bar'|'foo'|mixed
, but doesn't know the keys are'foo'|'bar'
?which leads to ..
ERROR: MixedArgumentTypeCoercion
when passing the results to another methoddo I need to add some annotation?