1 2 3 4 5 6 7 8 9 10 11 12
trait Space { type T val x: T } trait Extractor { def extract(s: Space): s.T } class Sub extends Extractor { def extract(ss: Space) = ss.x }