summaryrefslogblamecommitdiff
path: root/test/files/run/reify_newimpl_49.scala
blob: 2222bd69d5511141680c9b0ccc6f4201a8bfed67 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

                                       













                                                                
import scala.reflect.runtime.universe._
import scala.tools.reflect.Eval

object Test extends App {
  {
    var y = 1
    def x = { y += 2; y }
    val code = reify {
      def foo = y // ensures that y is the first freevar we find
      println(x)
      println(y)
      println(x)
    }
    code.eval
  }
}