aboutsummaryrefslogblamecommitdiff
path: root/tests/pos/tailcall/i1221.scala
blob: ba1dbc4a96c95c7e158d405b2d5948da9b777b53 (plain) (tree)
1
2
3
4
5
6
7
8
9
10

                         
             






                                
import annotation.tailrec

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