aboutsummaryrefslogtreecommitdiff
path: root/tests/run/t1994.scala
blob: 0b463e3444d0d8e91dfec465e060de4aa09e2938 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
class A {
  protected def x = 0
  protected[A] def y = 0
}
 
class B extends A {
  override def x = 1
  def superY = super[A].y
  override def y = 1
}


object Test {
  def main(args: Array[String]): Unit = {
    val b = new B
    assert(b.x == 1)
    assert(b.y == 1)
    assert(b.superY == 0)
  }
}