aboutsummaryrefslogtreecommitdiff
path: root/tests/run/virtpatmat_tailcalls_verifyerror.scala
blob: 46c75cf9c8606e6e046b26b4d78631705c50dc45 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// shouldn't result in a verify error when run...
object Test extends dotty.runtime.LegacyApp {
  @annotation.tailrec
  final def test(meh: Boolean): Boolean = {
    Some("a") match {
      case x =>
        x match {
          case Some(_) => if(meh) test(false) else false
          case _ => test(false)
        }
    }
  }
  println(test(true))
}