blob: 26163555f0ba78e889bf1a32c6396a23cfc6de23 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
|
object Test extends dotty.runtime.LegacyApp {
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)
}
|