class Flat[T] { type R = T } implicit def flat[T]: Flat[T] = null def f[A, B]: A with B = null.asInstanceOf[A with B] def g[A, B](implicit flat: Flat[A with B]): flat.R = f[A, B] f[Int with Long, Int] // infers Int with Long with Int g[Int with Long,Int] // infers Int with Long
-
-
It looks like I managed to hurt your feelings Jon, didn't I? I apologise )
-
No, of course not. You're completely right to admonish me for casts and nulls!
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.