aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/tailcall/i1221.scala
blob: 80dcfdc4b3382dff6f39a3a55595aa2c7f2b8ae9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
import annotation.tailrec

object Test{
  final def foo(a: Int): Int = {
  if (foo(a - 1) > 0) 
    foo(a - 1): @tailrec 
  else 
    foo(a - 2): @tailrec
  }
}