summaryrefslogblamecommitdiff
path: root/test/pending/run/reify_closure9a.scala
blob: 1fc18cfa135e4a41203b7cab2dae5e3873138950 (plain) (tree)
1
2
3
4
5
6
7
8
9
                             


                           
                        

     
                             
                                                  




                         
import scala.reflect.mirror._
object Test extends App {
  def foo(y: Int) = {
    class Foo(val y: Int) {
      def fun = reify{y}
    }

    val toolbox = mkToolBox()
    val dyn = toolbox.runExpr(new Foo(y).fun.tree)
    dyn.asInstanceOf[Int]
  }

  println(foo(10))
}