Scala traits mixin order and super call
问题 I have this code: trait base{ def msg: Unit= { println{"base"} } } trait foo extends base { abstract override def msg: Unit ={ super.msg println("foo") } } class base2{ def msg:Unit = { println{"base 2"} } } class test extends base2 with foo{ override def msg: Unit ={ super.msg println("done") } } If I call (new test).msg , this prints out things like: base, foo, done However, if I change the base trait to: trait base{ def msg: Unit } it prints out things like: base 2, foo, done I understand