aboutsummaryrefslogtreecommitdiff
path: root/tests/pending/run/reflection-sorted-members.scala
blob: 7a09f9d296b06752cbbee8f7a2a01e0d1a9f927d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
object Test  {
  def main(args: Array[String]): Unit = {
    trait T1 { def a: Int; def c: Int }
    trait T2 { def a: Int; def b: Int }
    class Bar(val x: Int)
    class Foo(val a: Int, val b: Int, val c: Int) extends Bar(a + b + c) with T1 with T2
    import scala.reflect.runtime.{currentMirror => cm}
    val members = cm.classSymbol(classOf[Foo]).info.members
    members.sorted.toList.filter(!_.isMethod) foreach System.out.println
  }
}