aboutsummaryrefslogtreecommitdiff
path: root/tests/disabled/macro/run/t5770.scala
blob: 409efb2d1899a5b39e78accd63cf87cf349b9d66 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import scala.reflect.runtime.universe._
import scala.reflect.runtime.{currentMirror => cm}
import scala.tools.reflect._

object Test extends dotty.runtime.LegacyApp {
  var i = 0
  val action = reify { i += 1; println(i) }.tree

  val tb1 = cm.mkToolBox()
  tb1.eval(action)
  tb1.eval(action)
  tb1.eval(action)
  tb1.frontEnd.reset()
  tb1.eval(action)
  tb1.eval(action)

  val tb2 = cm.mkToolBox()
  tb2.eval(action)
  tb2.frontEnd.reset()
  tb2.eval(action)
  tb2.eval(action)
  tb2.frontEnd.reset()
  tb2.eval(action)
  tb2.eval(action)
}