summaryrefslogblamecommitdiff
path: root/test/pending/run/reify_closure8b.scala
blob: 38031c217b7b0ec001e48cb5704609e0a00eaaf7 (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 {
  class Foo(y: Int) {
    def fun = lift{y}
  }

  val reporter = new ConsoleReporter(new Settings)
  val toolbox = new ToolBox(reporter)
  val dyn = toolbox.runExpr(new Foo(10).fun.tree)
  val foo = dyn.asInstanceOf[Int]
  println(foo)
}