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














                                                                
import scala.reflect.mirror._

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