Open marcosh opened 2 years ago
I found these snippets:
I don't think @return Either<B> implements DefaultFunctor<EitherBrand, B> extends HK1<EitherBrand, B>
has any meaning in Psalm. everything from implements
is just seen as a comment in the return.
Also, this seems to work: https://psalm.dev/r/4dd5c2ef98
Maybe a template covariance issue?
I found these snippets:
I don't think
@return Either<B> implements DefaultFunctor<EitherBrand, B> extends HK1<EitherBrand, B>
has any meaning in Psalm. everything fromimplements
is just seen as a comment in the return.
Sure, that was not meant to read by Psalm, but by humans, to clarify why the raised issue should actually not be there
Also, this seems to work: https://psalm.dev/r/4dd5c2ef98
Using EitherBrand
here is important because it says that those functions could be used only with instances of Either
and not of any other class being an instance of Functor
and Traversable
Maybe a template covariance issue?
I tried adding template-covariance
annotations on every template, but it does not seem to solve the issue, see https://psalm.dev/r/491d084795
I found these snippets:
This snippet of code (https://psalm.dev/r/cad42fc0c5) produces a strange error message which disappears as soon as I remove the constraint from the template or any item in the inheritance chain of interfaces.