-
Notifications
You must be signed in to change notification settings - Fork 65
Add @template-covariant support #34
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
Conversation
That seems way too long. Why not extend the existing @template
annotation to support in/out keywords (Kotlin) or +/- signs (Scala)?
/** * @template in T */
We need to support what's already in the wild. But we also plan to support @phpstan-generic<K, V>
syntax and prefer it in the docs etc. See the discussion there (and feel free to contribute to it!): phpstan/phpstan#2527
muglug
commented
Nov 6, 2019
That seems way too long. Why not extend the existing @template annotation to support in/out keywords (Kotlin) or +/- signs (Scala)?
The reason I went with -covariant
is that it seemed to me, as a newcomer to the idea, something that should be annotated fairly explicitly.
Also I felt out
was confusing given by-ref parameters: vimeo/psalm#1603 (comment)
No description provided.