Skip to content

Commit

Permalink
Amend doc
Browse files Browse the repository at this point in the history
  • Loading branch information
EugeneFlesselle committed Jun 7, 2024
1 parent ee54814 commit 81a1184
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/pos/typeclass-encoding3b.scala
Original file line number Diff line number Diff line change
Expand Up @@ -347,10 +347,10 @@ object functors {
MonadFlatten.flattened(List(List(1, 2, 3), List(4, 5))) // ok, synthesizes (using ListMonad)
MonadFlatten.flattened(List(List(1, 2, 3), List(4, 5)))(using ListMonad) // was an error
/*
When checking `ListMonad <:< functors.Monad.Impl[T]`
we eventually get to the comparison `[X] =>> T[X] <:< [+X] =>> List[X]`
Before the changes, when checking `ListMonad <:< functors.Monad.Impl[T]`
we eventually got to the comparison `[X] =>> T[X] <:< [+X] =>> List[X]`
because the `This` type member of `ListMonad` has a covariance annotation.
This fails the variance conformance checks despite the fact that T has been instantiated to List,
since it has been substituted into the refinement (and cached) before its instantiation.
This failed the variance conformance checks despite the fact that T had been instantiated to List,
since it had been substituted into the refinement (and cached) before its instantiation.
*/
}

0 comments on commit 81a1184

Please sign in to comment.