summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
Diffstat (limited to 'test/files')
-rw-r--r--test/files/run/t5652.check8
-rw-r--r--test/files/run/t5652/t5652_1.scala6
-rw-r--r--test/files/run/t5652/t5652_2.scala9
-rw-r--r--test/files/run/t5652b.check4
-rw-r--r--test/files/run/t5652b/t5652b_1.scala3
-rw-r--r--test/files/run/t5652b/t5652b_2.scala9
-rw-r--r--test/files/run/t5652c.check6
-rw-r--r--test/files/run/t5652c/t5652c.scala10
8 files changed, 55 insertions, 0 deletions
diff --git a/test/files/run/t5652.check b/test/files/run/t5652.check
new file mode 100644
index 0000000000..11438ef217
--- /dev/null
+++ b/test/files/run/t5652.check
@@ -0,0 +1,8 @@
+public static final int T1$class.g$1(T1)
+public static int T1$class.f0(T1)
+public static void T1$class.$init$(T1)
+public final int A1.A1$$g$2()
+public int A1.f1()
+public final int A2.A2$$g$1()
+public int A2.f0()
+public int A2.f2()
diff --git a/test/files/run/t5652/t5652_1.scala b/test/files/run/t5652/t5652_1.scala
new file mode 100644
index 0000000000..5343f260a2
--- /dev/null
+++ b/test/files/run/t5652/t5652_1.scala
@@ -0,0 +1,6 @@
+trait T1 {
+ def f0 = { def g = 1 ; class A { def a = g } ; g ; new A().a }
+}
+class A1 {
+ def f1 = { def g = 1 ; class A { def a = g } ; g ; new A().a }
+}
diff --git a/test/files/run/t5652/t5652_2.scala b/test/files/run/t5652/t5652_2.scala
new file mode 100644
index 0000000000..765d16f8f5
--- /dev/null
+++ b/test/files/run/t5652/t5652_2.scala
@@ -0,0 +1,9 @@
+class A2 extends A1 with T1{
+ def f2 = { def g = 5 ; class A { def a = g }; g ; new A().a }
+}
+
+object Test extends A2 {
+ def main(args: Array[String]) {
+ println(Seq(Class.forName(classOf[T1].getName + "$class"), classOf[A1], classOf[A2]).flatMap(_.getDeclaredMethods.map(_.toString).sorted).mkString("\n"))
+ }
+}
diff --git a/test/files/run/t5652b.check b/test/files/run/t5652b.check
new file mode 100644
index 0000000000..ca9d0a74f0
--- /dev/null
+++ b/test/files/run/t5652b.check
@@ -0,0 +1,4 @@
+private final int A1.g$1()
+public int A1.f1()
+private final int A2.g$1()
+public int A2.f2()
diff --git a/test/files/run/t5652b/t5652b_1.scala b/test/files/run/t5652b/t5652b_1.scala
new file mode 100644
index 0000000000..72ba5dcd82
--- /dev/null
+++ b/test/files/run/t5652b/t5652b_1.scala
@@ -0,0 +1,3 @@
+class A1 {
+ def f1 = { def g = 5 ; class A { def a = 0 } ; new A; g }
+}
diff --git a/test/files/run/t5652b/t5652b_2.scala b/test/files/run/t5652b/t5652b_2.scala
new file mode 100644
index 0000000000..113736a24b
--- /dev/null
+++ b/test/files/run/t5652b/t5652b_2.scala
@@ -0,0 +1,9 @@
+class A2 extends A1 {
+ def f2 = { def g = 5 ; class A { def a = 0 } ; new A; g }
+}
+
+object Test extends A2 {
+ def main(args: Array[String]) {
+ println(Seq(classOf[A1], classOf[A2]).flatMap(_.getDeclaredMethods.map(_.toString).sorted).mkString("\n"))
+ }
+}
diff --git a/test/files/run/t5652c.check b/test/files/run/t5652c.check
new file mode 100644
index 0000000000..3b889e066d
--- /dev/null
+++ b/test/files/run/t5652c.check
@@ -0,0 +1,6 @@
+public final int A1.A1$$g$1()
+public final int A1.A1$$g$2()
+public int A1.f1()
+public int A1.f2()
+1
+2
diff --git a/test/files/run/t5652c/t5652c.scala b/test/files/run/t5652c/t5652c.scala
new file mode 100644
index 0000000000..c977483280
--- /dev/null
+++ b/test/files/run/t5652c/t5652c.scala
@@ -0,0 +1,10 @@
+class A1 {
+ def f1 = { def g = 1 ; class A { def a = g } ; new A().a }
+ def f2 = { def g = 2 ; class A { def a = g } ; new A().a }
+}
+
+object Test extends App {
+ println(classOf[A1].getDeclaredMethods.map(_.toString).sorted.mkString("\n"))
+ println(new A1().f1)
+ println(new A1().f2)
+}