import scala.reflect.runtime.universe._
import scala.tools.reflect.ToolBox
import scala.tools.reflect.Eval
class O { class I }
class A extends O {
val code = reify {
val v: I = new I
v
}
println(showRaw(code))
}
object Test extends App {
val v: A#I = (new A).code.eval
}
Class A is reified as free term A$value, and reflective compilation fails on typecheck of the expression new A$value.I() with the following error:
issue error: Test.this.A is not a legal prefix for a constructor