blob: 58954c2f98dd15956f50489aa6c0ab5f93f7c131 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
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 { override def toString = "C" }
val ret = new C
ret.asInstanceOf[Object]
};
val toolbox = cm.mkToolBox()
println(toolbox.eval(code.tree))
}
|