= Solution
The output becomes \b[`BCA`], without a newline. Here each method body consists only of `super.m`; the semicolon ends that definition. The following `print("B")` or `print("C")` is a separate statement in the <trait> body, so it executes during construction.
Creating `new D` initializes the shared base and then the `B` and `C` <mixins>, printing `BC`. The subsequent `d.m` still forwards along `C,B,A`, but only `A.m` now prints anything, appending `A`. Thus it is the placement of the construction-time statements, not a changed <Scala trait linearization>, that changes the output. <Scala 2.11 classes and objects specification>[Template Evaluation]{ref}
Back to article page