summaryrefslogtreecommitdiff
path: root/test/files/run/all-overridden.scala
blob: ff51fa19bfc0234370badf947a55e13ddd7fdfed (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
import scala.reflect.runtime.universe._

object Test {
  trait Foo { def f: Int = 5 ; def g: Int }
  trait Bar extends Foo { def f: Int ; def g: Int = 5 }

  def main(args: Array[String]): Unit = {
    // We should see g, but not f or $init$.
    typeOf[Bar].decls.toList.flatMap(_.overrides) foreach println
  }
}