summaryrefslogtreecommitdiff
path: root/test/files/run/t8637.scala
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2014-05-30 13:00:38 +0200
committerEugene Burmako <xeno.by@gmail.com>2014-05-30 13:00:38 +0200
commitc98aa6f9b149550243b68274e24a6f3174b7f85b (patch)
tree9526ef9b449fa584a1c44baec52f81049badad1d /test/files/run/t8637.scala
parentd079e769b9372daae8d7770c4156f85ea1af6621 (diff)
downloadscala-c98aa6f9b149550243b68274e24a6f3174b7f85b.tar.gz
scala-c98aa6f9b149550243b68274e24a6f3174b7f85b.tar.bz2
scala-c98aa6f9b149550243b68274e24a6f3174b7f85b.zip
SI-8637 fixes toolbox phase corruption
It turns out, Toolbox.typecheck hasn't been properly re-initializing its state between requests. In particular, globalPhase was left untouched, which made the compiler think that it's past typer, and that in turn disabled implicits. This commit applies a symptomatic fix to this problem.
Diffstat (limited to 'test/files/run/t8637.scala')
-rw-r--r--test/files/run/t8637.scala9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/files/run/t8637.scala b/test/files/run/t8637.scala
new file mode 100644
index 0000000000..99c8d4c413
--- /dev/null
+++ b/test/files/run/t8637.scala
@@ -0,0 +1,9 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.currentMirror
+import scala.tools.reflect.ToolBox
+
+object Test extends App {
+ val tb = currentMirror.mkToolBox()
+ tb.compile(q"true > true")
+ tb.typecheck(q"true > true")
+} \ No newline at end of file