aboutsummaryrefslogtreecommitdiff
path: root/tests/run/supercalls-traits.scala
blob: 09e841f46226c6244aef08a1d071826f1814adfd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
trait A {
 def foo = 1
}

trait B {
 def foo = 2
}

class C extends A with B {
 override def foo = super[A].foo + super[B].foo
}

object Test {
 def main(args: Array[String]) = assert(new C().foo == 3)
}