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
[info] /Users/v724000/devel/variancebad/src/main/scala/foo.scala:7: foo is not a valid implicit value forCodec[A] because:
[info] hasMatchingSymbol reported error: diverging implicit expansion fortypeCodec[A]
[info] starting with method foo in objectFoo
[info] valx= implicitly[Decoder[F[Int]]]
If I add the variance annotation to Codec, or if I remove the variance annotation from either F or Decoder then it does the right thing (which is to give me implicit not found instead of diverging implicits).
If I add an implicit Codec for Int:
implicitvalint:Codec[Int] =null
it compiles in 2.10.4 but in 2.11.2 I still get diverging implicits.
The text was updated successfully, but these errors were encountered:
Discovered this bug in the discussion of scodec/scodec#26
here is a minimal test case that fails:
trying to compile this gives me:
If I add the variance annotation to Codec, or if I remove the variance annotation from either F or Decoder then it does the right thing (which is to give me implicit not found instead of diverging implicits).
If I add an implicit Codec for Int:
it compiles in 2.10.4 but in 2.11.2 I still get diverging implicits.
The text was updated successfully, but these errors were encountered: