summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@typesafe.com>2014-07-09 16:33:54 +0200
committerLukas Rytz <lukas.rytz@typesafe.com>2014-07-09 16:33:54 +0200
commitaea6519685561ee076e7fdaac48c2bf970389b83 (patch)
treed8e37b54a6cc5196a555a05df7ce2ddc0200dfe4 /test/files/run
parent4d3ede90b599a344b6d88316a7f62472ef8520e2 (diff)
parent14fa7bef120cbb996d042daba6095530167c49ed (diff)
downloadscala-aea6519685561ee076e7fdaac48c2bf970389b83.tar.gz
scala-aea6519685561ee076e7fdaac48c2bf970389b83.tar.bz2
scala-aea6519685561ee076e7fdaac48c2bf970389b83.zip
Merge pull request #3867 from lrytz/t8708
SI-8708 Fix pickling of LOCAL_CHILD child of sealed classes
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/t8708_b.check8
-rw-r--r--test/files/run/t8708_b/A_1.scala8
-rw-r--r--test/files/run/t8708_b/Test_2.scala21
3 files changed, 37 insertions, 0 deletions
diff --git a/test/files/run/t8708_b.check b/test/files/run/t8708_b.check
new file mode 100644
index 0000000000..30be62a307
--- /dev/null
+++ b/test/files/run/t8708_b.check
@@ -0,0 +1,8 @@
+Scope{
+ def <init>: <?>;
+ sealed abstract trait T extends ;
+ def foo: <?>
+}
+Scope{
+ def f: <?>
+}
diff --git a/test/files/run/t8708_b/A_1.scala b/test/files/run/t8708_b/A_1.scala
new file mode 100644
index 0000000000..e767420f9e
--- /dev/null
+++ b/test/files/run/t8708_b/A_1.scala
@@ -0,0 +1,8 @@
+package p
+
+class C {
+
+ sealed trait T { def f: Int }
+
+ def foo: T = new T { def f = 1 }
+}
diff --git a/test/files/run/t8708_b/Test_2.scala b/test/files/run/t8708_b/Test_2.scala
new file mode 100644
index 0000000000..c978490609
--- /dev/null
+++ b/test/files/run/t8708_b/Test_2.scala
@@ -0,0 +1,21 @@
+import scala.tools.partest._
+import java.io.{Console => _, _}
+
+object Test extends DirectTest {
+
+ override def extraSettings: String = "-usejavacp -cp " + testOutput.path
+
+ override def code = ""
+
+ override def show(): Unit = {
+ val g = newCompiler()
+ withRun(g)(r => {
+ val c = g.rootMirror.getRequiredClass("p.C")
+ println(c.info.decls)
+ val t = c.info.member(g.newTypeName("T"))
+ // this test ensrues that the <local child> dummy class symbol is not entered in the
+ // scope of trait T during unpickling.
+ println(t.info.decls)
+ })
+ }
+}