diff options
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/t4134.check | 4 | ||||
-rw-r--r-- | test/files/neg/t4134.scala | 30 |
2 files changed, 34 insertions, 0 deletions
diff --git a/test/files/neg/t4134.check b/test/files/neg/t4134.check new file mode 100644 index 0000000000..35a1820b0a --- /dev/null +++ b/test/files/neg/t4134.check @@ -0,0 +1,4 @@ +t4134.scala:22: error: Member method f of mixin trait T2 is missing a concrete super implementation. +class Konkret extends T3 + ^ +one error found diff --git a/test/files/neg/t4134.scala b/test/files/neg/t4134.scala new file mode 100644 index 0000000000..678e4806ef --- /dev/null +++ b/test/files/neg/t4134.scala @@ -0,0 +1,30 @@ + + + +trait T1 { + def f: String +} + +trait T2 extends T1 { + abstract override def f: String = "goo" + def something = super.f // So the "abstract override" is needed +} + +trait Q1 { + def f: String = "bippy" +} + +//trait T3 extends Q1 with T2 { +trait T3 extends T2 with Q1 { + abstract override def f: String = super[Q1].f + " " + super[T2].f + " hoo" +} + +class Konkret extends T3 + +object Test { + def main(args: Array[String]): Unit = { + val k = new Konkret + println(k.f) + println(k.something) + } +} |