summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan@lightbend.com>2017-02-20 13:55:12 -0800
committerGitHub <noreply@github.com>2017-02-20 13:55:12 -0800
commite87a43615d2d20300190057ec16109f094d59092 (patch)
treee1441311bb28b23b402db92fa3987e27a74ea8dd /test
parent23e5ed9219b503c6a394b28d014ea5c29893db8d (diff)
parent777a0e5ae35e174cc79e786d0333183041baf123 (diff)
downloadscala-e87a43615d2d20300190057ec16109f094d59092.tar.gz
scala-e87a43615d2d20300190057ec16109f094d59092.tar.bz2
scala-e87a43615d2d20300190057ec16109f094d59092.zip
Merge pull request #5659 from retronym/ticket/10026
SI-10026 Fix endless cycle in runtime reflection
Diffstat (limited to 'test')
-rw-r--r--test/files/run/t10026.check1
-rw-r--r--test/files/run/t10026.scala11
2 files changed, 12 insertions, 0 deletions
diff --git a/test/files/run/t10026.check b/test/files/run/t10026.check
new file mode 100644
index 0000000000..15a62794a9
--- /dev/null
+++ b/test/files/run/t10026.check
@@ -0,0 +1 @@
+List(1, 2, 3)
diff --git a/test/files/run/t10026.scala b/test/files/run/t10026.scala
new file mode 100644
index 0000000000..a56840c8c2
--- /dev/null
+++ b/test/files/run/t10026.scala
@@ -0,0 +1,11 @@
+import scala.reflect.runtime.universe
+import scala.tools.reflect.ToolBox
+
+object Test {
+ def main(args: Array[String]): Unit = {
+ val classloader = getClass.getClassLoader
+ val toolbox = universe.runtimeMirror(classloader).mkToolBox()
+ println(toolbox.compile(toolbox.parse("Array(1, 2, 3).toList")).apply())
+ }
+}
+