You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to define a method with a template that I can scope by the class template.
This way
Manager<Foo|Bar>::find(Baz) is invalid.
Manager<Foo|Bar>::find(Foo) will return Foo (and not Foo|Baz).
Is it a bug ?
The text was updated successfully, but these errors were encountered:
@@ @@-29: Parameter #1 $class (class-string<R of T of Entity>) of method MyManager::find() should be contravariant with parameter $class (class-string<T of object>) of method Manager<T of Entity>::find()-29: Return type (R of T of Entity) of method MyManager::find() should be covariant with return type (T of object) of method Manager<T of Entity>::find()+No errors
Discussed in #7102
Originally posted by VincentLanglet April 24, 2022
Hi @ondrejmirtes, I have trouble to understand why I get an error from the following snippet
https://phpstan.org/r/2adcc3bb-8d05-4d79-91e1-78e282855229
Psalm doesn't report an error https://psalm.dev/r/ae8f5c32ff
I'd like to define a method with a template that I can scope by the class template.
This way
Manager<Foo|Bar>::find(Baz) is invalid.
Manager<Foo|Bar>::find(Foo) will return Foo (and not Foo|Baz).
Is it a bug ?
The text was updated successfully, but these errors were encountered: