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