aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/superacc.scala
blob: 91397003db70bc1042982e7dc7e080d90972d4b7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// scenario one: supercalls in traits
abstract class C {
  def foo: Int = 2
  def baz: Int = 2
}

trait T extends C {
  override def foo = super.foo + 1
}


// scenario 2: supercalls in nested classes
class D extends C with T {
  class I {
    val x= D.super.baz
  }
}