aboutsummaryrefslogtreecommitdiff
path: root/tests/run/supercalls-traits.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run/supercalls-traits.scala')
-rw-r--r--tests/run/supercalls-traits.scala15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/run/supercalls-traits.scala b/tests/run/supercalls-traits.scala
new file mode 100644
index 000000000..09e841f46
--- /dev/null
+++ b/tests/run/supercalls-traits.scala
@@ -0,0 +1,15 @@
+trait A {
+ def foo = 1
+}
+
+trait B {
+ def foo = 2
+}
+
+class C extends A with B {
+ override def foo = super[A].foo + super[B].foo
+}
+
+object Test {
+ def main(args: Array[String]) = assert(new C().foo == 3)
+}