aboutsummaryrefslogtreecommitdiff
path: root/tests/run/t7992.scala
blob: 9753765c0b27eeaaabdf8631cd4faa64281a43b0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
class C {
  def foo: Int = 0
}

class D extends C {
  override def foo: Int = {
    val f = () => {
      class C     // comment this line to fix.
      D.super.foo // no super accessor generated here!
      // java.lang.VerifyError: (class: D$$anonfun$1, method: apply$mcI$sp signature: ()I) Illegal use of nonvirtual function call
    }
    f()
  }
}

object Test {
  def main(args: Array[String]): Unit = {
    new D().foo
  }
}