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
objectApp {
caseclassBox[F[_]](value: F[Int])
sealedtraitIsK[F[_], G[_]]
finalcaseclassReflK[F[_]]() extendsIsK[F, F]
deffoo[F[_], G[_]](r: FIsKG, a: Box[F]):Box[G] = r match { caseReflK() => a }
defmain(args: Array[String]):Unit= {
println(foo(ReflK(), Box(Option(10))))
}
}
-- [E007] TypeMismatchError: foo.scala:6:81----------------------------------6|deffoo[F[_], G[_]](r: FIsKG, a: Box[F]):Box[G] = r match { caseReflK() => a }
|^|found: App.Box[F](a)
|required: App.Box[G]
||where: F is a typein method foo with bounds <:G[_]
|G is a typein method foo with bounds <:F[_]
one error found