summaryrefslogblamecommitdiff
path: root/test/files/run/reify_closures10.scala
blob: 2d9b8338516dea33307f138b8b8a55f01cd853c9 (plain) (tree)
1
2
3
4
5
6
7
8
9



                                                  

                         

           
                                         
 
                              
                                     
 
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 App {
  val x = 2
  val y = 3
  val code = reify{println(x + y); x + y}

  val toolbox = cm.mkToolBox()
  println(toolbox.runExpr(code.tree))
}