diff options
author | odersky <odersky@gmail.com> | 2016-07-31 13:14:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-31 13:14:56 +0200 |
commit | 3e6cdefec861f3b7aa98d0f5cced1a58e1908135 (patch) | |
tree | 7f90e1baf8444f07f033eba5b81a4194aeeed657 /tests | |
parent | bd71f785f32949e9b6c3b6121bef63d8bf05f231 (diff) | |
parent | a9976bd2729acbceefd46c612a08b8a42ccd9562 (diff) | |
download | dotty-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.check | 5 | ||||
-rw-r--r-- | tests/run/i1423.scala | 20 |
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() + } +} |