From b65b7b13924a86d38e04873f9c68d69590dec661 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Mon, 6 Aug 2012 11:01:50 -0700 Subject: Fix for SI-6063, broken static forwarders. Have to rule out access boundaries as well as private/protected. --- test/files/run/t6063.check | 1 + test/files/run/t6063/S_1.scala | 11 +++++++++++ test/files/run/t6063/S_2.scala | 8 ++++++++ 3 files changed, 20 insertions(+) create mode 100644 test/files/run/t6063.check create mode 100644 test/files/run/t6063/S_1.scala create mode 100644 test/files/run/t6063/S_2.scala (limited to 'test/files') diff --git a/test/files/run/t6063.check b/test/files/run/t6063.check new file mode 100644 index 0000000000..39347383f3 --- /dev/null +++ b/test/files/run/t6063.check @@ -0,0 +1 @@ +public static int foo.Ob.f5() diff --git a/test/files/run/t6063/S_1.scala b/test/files/run/t6063/S_1.scala new file mode 100644 index 0000000000..69b1e91271 --- /dev/null +++ b/test/files/run/t6063/S_1.scala @@ -0,0 +1,11 @@ +package foo + +abstract class Foo { + private[foo] def f1 = 1 + private def f2 = 2 + protected[foo] def f3 = 3 + protected def f4 = 4 + def f5 = 5 +} + +object Ob extends Foo diff --git a/test/files/run/t6063/S_2.scala b/test/files/run/t6063/S_2.scala new file mode 100644 index 0000000000..a990cc7931 --- /dev/null +++ b/test/files/run/t6063/S_2.scala @@ -0,0 +1,8 @@ +import java.lang.reflect.Modifier._ + +object Test { + def main(args: Array[String]): Unit = { + val forwarders = Class.forName("foo.Ob").getMethods.toList filter (m => isStatic(m.getModifiers)) + forwarders.sortBy(_.toString) foreach println + } +} -- cgit v1.2.3