aboutsummaryrefslogtreecommitdiff
path: root/tests/disabled/macro/run/t5230.scala
blob: 5c934c3452f943682b424562f6c322c65c16be62 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import scala.reflect.runtime.universe._
import scala.reflect.runtime.{universe => ru}
import scala.reflect.runtime.{currentMirror => cm}
import scala.tools.reflect.ToolBox

object Test extends dotty.runtime.LegacyApp {
  val code = reify {
    class C {
      val x = 2
    }

    println(new C().x)
  };

  val toolbox = cm.mkToolBox()
  val evaluated = toolbox.eval(code.tree)
  println("evaluated = " + evaluated)
}