1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
object Lizt { val empty = new Lizt[Nothing] { def cons[A](a : A): Unit = {} } } trait Lizt[A] { def cons(a : A) : Unit } class Test { abstract class C[A] {} val c = new C[Int] { def f[A](x: A): Unit = {} } }