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
@road21 Interesting, this looks like a type inference issue on Scala 2, not a bug in the macro itself. If the TagKK type is inlined to its underlying HKTag form, it works:
could not find implicit value for izumi.reflect.Tag[A]. Did you forget to put on a Tag, TagK or TagKK context bound on one of the parameters in A? e.g. def x[T: Tag, F[_]: TagK] = ...
<trace>:
deriving Tag for A, dealiased: A:
could not find implicit value for Tag[A]: A is a type parameter without an implicit Tag!
def test[F[_]: TagK]: TagKK[Mono[F, *, *]] = izumi.reflect.HKTag.hktagFromTagMacro
What is A here? It seems to be an artefact of type inference.
It would be great to minimize this so as not to require the macro and report to Scala 2 upstream...
This code is not compiling in scala 2.13.16:
The same code is compiling in scala 3 without compiler errors:
As a workaround
type Mono[F[_], x, y] >: F[Either[x, y]] <: F[Either[x, y]]
works.Scastie: https://scastie.scala-lang.org/road21/j3t7ODHHQzqjYW0hPysctg/30
The text was updated successfully, but these errors were encountered: