aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorodersky <odersky@gmail.com>2016-07-31 13:14:56 +0200
committerGitHub <noreply@github.com>2016-07-31 13:14:56 +0200
commit3e6cdefec861f3b7aa98d0f5cced1a58e1908135 (patch)
tree7f90e1baf8444f07f033eba5b81a4194aeeed657 /tests
parentbd71f785f32949e9b6c3b6121bef63d8bf05f231 (diff)
parenta9976bd2729acbceefd46c612a08b8a42ccd9562 (diff)
downloaddotty-3e6cdefec861f3b7aa98d0f5cced1a58e1908135.tar.gz
dotty-3e6cdefec861f3b7aa98d0f5cced1a58e1908135.tar.bz2
dotty-3e6cdefec861f3b7aa98d0f5cced1a58e1908135.zip
Merge pull request #1425 from dotty-staging/fix-#1423
Fix #1423: Fix owners of called methods in CollectSuperCalls.
Diffstat (limited to 'tests')
-rw-r--r--tests/run/i1423.check5
-rw-r--r--tests/run/i1423.scala20
2 files changed, 25 insertions, 0 deletions
diff --git a/tests/run/i1423.check b/tests/run/i1423.check
new file mode 100644
index 000000000..a6a795856
--- /dev/null
+++ b/tests/run/i1423.check
@@ -0,0 +1,5 @@
+3
+2
+3
+1
+0
diff --git a/tests/run/i1423.scala b/tests/run/i1423.scala
new file mode 100644
index 000000000..a7091c114
--- /dev/null
+++ b/tests/run/i1423.scala
@@ -0,0 +1,20 @@
+class B { def m: Int = 0 }
+class C extends B { override def m = 4 }
+trait T1 extends B { override def m = 1 }
+trait T2 extends T1 { override def m = 2 }
+trait T3 extends T1 { override def m = 3 }
+
+trait T4 extends T1
+class D extends B {
+ def f() = println(super[B].m)
+}
+
+object Test extends C with T2 with T3 with T4 {
+ def main(args: Array[String]): Unit = {
+ println(m)
+ println(super[T2].m)
+ println(super[T3].m)
+ println(super[T4].m)
+ new D().f()
+ }
+}