Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support generic type as upper bound of another generic type #4049

Closed
jost125 opened this issue Nov 3, 2020 · 4 comments
Closed

Support generic type as upper bound of another generic type #4049

jost125 opened this issue Nov 3, 2020 · 4 comments

Comments

@jost125
Copy link

jost125 commented Nov 3, 2020

Feature request

Is there any plan to support upper bounds based on another generic type? E.g:

https://phpstan.org/r/3865be4c-01c9-432b-98c6-2452912705e3

We need this to implement variance correctly on multiple types in our library.

@ondrejmirtes
Copy link
Member

Hi, it's similar to this but I'll keep both open: #3922

Would be nice to have some real-world examples with expected output (when it finds a real bug) so that I know when @template B of A can make a difference instead of just @template B.

@ondrejmirtes ondrejmirtes added this to the Generics milestone Nov 3, 2020
@jost125
Copy link
Author

jost125 commented Nov 6, 2020

Hi, sorry for late replay, I will add more obvious example soon, I am just too busy right now ;-)

@ondrejmirtes
Copy link
Member

Closing this - feel to reopen when you provide useful examples :) Thanks.

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants