summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/t7558.scala9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/files/run/t7558.scala b/test/files/run/t7558.scala
new file mode 100644
index 0000000000..bfcaaba5cc
--- /dev/null
+++ b/test/files/run/t7558.scala
@@ -0,0 +1,9 @@
+object Test extends App {
+ val cm = reflect.runtime.currentMirror
+ val u = cm.universe
+ import scala.tools.reflect.ToolBox
+ val tb = cm.mkToolBox()
+ val t = { var x = "ab".toList; u.reify { x = x.reverse; x }.tree }
+ val evaluated = tb.eval(t)
+ assert(evaluated == "ba".toList, evaluated)
+}