Last active
December 10, 2015 05:28
-
-
Save 4e6/4388011 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//import scala.reflect.runtime.universe._ | |
import scala.reflect.runtime.{ currentMirror => m } | |
import scala.tools.reflect.ToolBox | |
import scala.tools.reflect.Eval | |
object Test extends App { | |
val tb = m.mkToolBox(options = "-Xprint:typer -Yshow-trees -Ydebug -Ytyper-debug") | |
class O { class I } | |
class A extends O { | |
val code = tb.u.reify { | |
val v: I = new I | |
v | |
} | |
println(tb.u.showRaw(code)) | |
} | |
tb.eval((new A).code.tree) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment