aboutsummaryrefslogtreecommitdiff
path: root/tests/disabled/macro/run/reify_inheritance.scala
blob: f4fb49edc78e5a7c55d690d06f1c447d248a8a3b (plain) (blame)
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
}