We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
How can I fix Bar::foo from this example https://psalm.dev/r/2ec8af4c04 ?
Bar::foo
In Scala I can introduce a lower type bound for a new type parameter A1 with lower bound of A: https://scastie.scala-lang.org/3gSkZWZZTnep7lhyzExsZw
A1
A
More details here https://docs.scala-lang.org/tour/lower-type-bounds.html
The text was updated successfully, but these errors were encountered:
I found these snippets:
<?php /** * @template-covariant A */ class Bar { /** * @param A $a */ public function foo($a): void { } /** * @template A1 * @template-bound A1 >: A # A is a lower bound for A1 * @param A1 $a */ public function foo2($a): void { } }
Psalm output (using commit 16b24bd): ERROR: InvalidTemplateParam - 9:15 - Template param A of Bar is marked covariant and cannot be used here
Sorry, something went wrong.
No branches or pull requests
How can I fix
Bar::foo
from this example https://psalm.dev/r/2ec8af4c04 ?In Scala I can introduce a lower type bound for a new type parameter
A1
with lower bound ofA
: https://scastie.scala-lang.org/3gSkZWZZTnep7lhyzExsZwMore details here https://docs.scala-lang.org/tour/lower-type-bounds.html
The text was updated successfully, but these errors were encountered: