diff options
author | Nicolas Stucki <nicolas.stucki@gmail.com> | 2016-07-29 10:30:33 +0200 |
---|---|---|
committer | Nicolas Stucki <nicolas.stucki@gmail.com> | 2016-07-29 11:50:23 +0200 |
commit | a9976bd2729acbceefd46c612a08b8a42ccd9562 (patch) | |
tree | 877672d23849565fe450f6b3596b658f2f34028c /tests | |
parent | cc21026a5a5ee2e2abd73687ff35ec3b83b7edb0 (diff) | |
download | dotty-a9976bd2729acbceefd46c612a08b8a42ccd9562.tar.gz dotty-a9976bd2729acbceefd46c612a08b8a42ccd9562.tar.bz2 dotty-a9976bd2729acbceefd46c612a08b8a42ccd9562.zip |
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() + } +} |