Using assertions with generics / template types #10520
-
Hi, I'm getting a confusing error in relation to using a type assertion mixed with a generic, and I'm uncertain whether I'm using this correctly. I've created a reproducer in the playground: https://phpstan.org/r/c8276a36-06ea-4fe6-9617-f88a70f1ece6 My expectation would be that the second
Furthermore in my actual code I'm using this generic as input for another generic which is determined based on the nested type So my question is whether I am using the assertion correctly, or whether this is a bug. (Obvious workaround would be to drop the Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I believe this is the same issue as: #10037 If you repeat the assert tag, it works. |
Beta Was this translation helpful? Give feedback.
I believe this is the same issue as: #10037
If you repeat the assert tag, it works.