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




                                     


                                        



                                                  
                                 
 
import scala.reflect.Code._
import scala.tools.nsc.reporters._
import scala.tools.nsc.Settings
import reflect.runtime.Mirror.ToolBox

object Test extends App {
  val x = 2
  val y = 3
  val code = lift{println(x + y); x + y}

  val reporter = new ConsoleReporter(new Settings)
  val toolbox = new ToolBox(reporter)
  val ttree = toolbox.typeCheck(code.tree)
  println(toolbox.runExpr(ttree))
}