Odd generic issue only when trait is used #10712
Unanswered
KorvinSzanto
asked this question in
Q&A
Replies: 1 comment 1 reply
-
This part is simple: traits are not checked at all, unless used. Simplified example: https://psalm.dev/r/a55aa42a2d
Bugs, I suppose.
More likely with index types. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Compare the following two sandboxes, the only change is the few lines at the very bottom:
What's causing the three errors in the second sandbox?
I'm seeing separate issues when trying to use my generic trait with imported types. If the type is imported, the keys don't seem to resolve. Compare the following two sandboxes, one uses an imported type while the other uses a local type.
Is this a bug with imported types, or am I misunderstanding how imported types are meant to be used?
Beta Was this translation helpful? Give feedback.
All reactions