Mixed*TypeCoercion purpose #7177
AndrolGenhald
started this conversation in
General
Replies: 1 comment 5 replies
-
array-key is often considered as mixed by Psalm. For a lot of purpose, those two types are pretty similar. In your example, you try to compare int to array-key, so Psalms tells you this is indeed a coercion. I guess the reason the issue is different is to give more control to users. by default, Mixed coercions are lvl 1 errors while ArgumentTypeCoercion is level 3. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is it useful for these to be distinct from their non-Mixed counterparts?
Why are they called Mixed? They don't seem to have anything to do with the
mixed
type.When are they supposed to be used? Just whenever coercion is used on an array's key or value? Why is this ArgumentTypeCoercion but this is MixedArgumentTypeCoercion? Wouldn't ArgumentTypeCoercion (or a new issue LessSpecificArgumentType) make more sense?
Beta Was this translation helpful? Give feedback.
All reactions