From a9976bd2729acbceefd46c612a08b8a42ccd9562 Mon Sep 17 00:00:00 2001 From: Nicolas Stucki Date: Fri, 29 Jul 2016 10:30:33 +0200 Subject: Fix #1423: Fix owners of called methods in CollectSuperCalls. --- tests/run/i1423.check | 5 +++++ tests/run/i1423.scala | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 tests/run/i1423.check create mode 100644 tests/run/i1423.scala (limited to 'tests') 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() + } +} -- cgit v1.2.3