1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
import scala.reflect.runtime.universe._ import scala.tools.reflect.Eval object Test extends dotty.runtime.LegacyApp { reify { class C { def x = 2 def y = x * x } class D extends C { override def x = 3 } println(new D().y * new C().x) }.eval }