blob: 9c486e4361c5fb6374dbfef6e7cd1160134c489a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
import scala.reflect.runtime.universe._
import scala.reflect.runtime.{universe => ru}
import scala.reflect.runtime.{currentMirror => cm}
import scala.tools.reflect.ToolBox
object Test extends dotty.runtime.LegacyApp {
val x = 2
val y = 3
val code = reify{println(x + y); x + y}
val toolbox = cm.mkToolBox()
println(toolbox.eval(code.tree))
}
|