tailrec-4.scala:6: error: could not optimize @tailrec annotated method foo: it contains a recursive call not in tail position @tailrec def foo: Int = foo + 1 ^ tailrec-4.scala:11: error: could not optimize @tailrec annotated method foo: it contains a recursive call not in tail position @tailrec def foo: Int = foo + 1 ^ tailrec-4.scala:17: error: could not optimize @tailrec annotated method foo: it contains a recursive call not in tail position @tailrec def foo: Int = foo + 1 ^ tailrec-4.scala:23: error: could not optimize @tailrec annotated method foo: it contains a recursive call not in tail position @tailrec def foo: Int = foo + 1 ^ tailrec-4.scala:31: error: could not optimize @tailrec annotated method foo: it contains a recursive call not in tail position @tailrec def foo: Int = foo + 1 ^ 5 errors found