We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f693e04 commit 979aad0Copy full SHA for 979aad0
tests/neg-tailcall/tailrec.scala
@@ -37,10 +37,11 @@ class Winners {
37
case x :: xs => succ3(xs, x :: acc)
38
}
39
40
- @tailrec final def fail3[T](x: Int): Int = fail3(x - 1)
+ @tailrec final def succ4[T](x: Int): Int = succ4(x - 1)
41
42
- class Tom[T](x: Int) {
43
- @tailrec final def fail4[U](other: Tom[U], x: Int): Int = other.fail4[U](other, x - 1)
+ class Tom[T] {
+ @tailrec final def succ5[U](other: Tom[U], x: Int): Int = other.succ5[U](other, x - 1)
44
+ @tailrec final def succ6(x: Int): Int = (new Tom[Int]).succ6(x - 1)
45
46
47
0 commit comments