// // Traits work through Linearization // // avoids "diamond" problem // class Top { def m = List("M") } trait T1 extends Top { override def m = "T1" :: super.m } trait T2 extends Top { override def m = "T2" :: super.m } class B extends T2 with T1 class B1 extends T1 with T2 class B2 extends Top with T1 with T2 class B3 extends Top with T2 with T1