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
classTest[F[_]] {
sealedtraitFoo[A, B]
// note that Foo's B param maps directly to U (i.e. no GADT involved on this type param)caseclassBar[T, U]() extendsFoo[F[T], U] {
defget:Option[U] =None
}
defgo[T, U](that: Foo[F[T], U]):Option[U] =
that matchcaseb: Bar[t, u] =>
summon[U=:= u] // Error: Cannot prove that U =:= u.
b.get // Error: Found: Option[u], Required: Option[U]
}
Output
Compilation fails, see the errors in the comments.