Unable to resolve template type T in call to method #4208
-
Hello again, I'm here to report some issues I'm having with generics. I'm fully aware that there might be something I'm doing wrong but after being able to reproduce the issue in the playground I decided to bring the issue here. In the following example https://phpstan.org/r/3e5efe3f-88a8-42a5-b22b-95fde29469e7 I have a class "Link" which can contain any class since it's generic. process_customers accepts any Link but when return value from get_customers which resolves "Link" phpstan will report "Unable to resolve the template type T". Another example https://phpstan.org/r/dd772bae-8118-4eee-8096-6236d44174a3 uses a CompanyLink which implements Link. Is this a bug or something I'm doing wrong? Thanks in advance. :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi, looks like this is a bug and not your fault :) Tracking here: #4209 |
Beta Was this translation helpful? Give feedback.
Hi, looks like this is a bug and not your fault :) Tracking here: #4209