blob: 18d6f90a9be00664a7df2e5055c99e80f303329d (
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
|
import scala.reflect.runtime.universe._
import scala.tools.reflect.ToolBox
import scala.tools.reflect.Eval
import java.lang.reflect.InvocationTargetException
class O { class I }
object A extends O {
val x = new O
val code = reify {
val v: x.I = ???
v
}
println(showRaw(code))
}
object Test extends App {
try {
val v: A.x.I = A.code.eval
} catch {
case ex: InvocationTargetException if ex.getCause.isInstanceOf[NotImplementedError] =>
}
}
|