From 1397c46ba4da89e7e824565f6f5e798a3329b272 Mon Sep 17 00:00:00 2001 From: mschweizer Date: Mon, 18 Dec 2017 14:41:34 +0100 Subject: [PATCH] Added println statements to get expected output --- _tour/mixin-class-composition.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_tour/mixin-class-composition.md b/_tour/mixin-class-composition.md index 267e98baa7..9a401f2fcc 100644 --- a/_tour/mixin-class-composition.md +++ b/_tour/mixin-class-composition.md @@ -28,8 +28,8 @@ trait C extends A { class D extends B with C val d = new D -d.message // I'm an instance of class B -d.loudMessage // I'M AN INSTANCE OF CLASS B +println(d.message) // I'm an instance of class B +println(d.loudMessage) // I'M AN INSTANCE OF CLASS B ``` Class `D` has a superclass `B` and a mixin `C`. Classes can only have one superclass but many mixins (using the keywords `extends` and `with` respectively). The mixins and the superclass may have the same supertype.