Make FE1.0 report tailrec diagnostics on the keyword

This commit is contained in:
Tianyu Geng
2021-09-27 11:37:00 -07:00
committed by teamcityserver
parent 5252effb10
commit a5435c0efc
7 changed files with 27 additions and 27 deletions
@@ -12,7 +12,7 @@ open class A {
}
class B : A() {
<!NO_TAIL_CALLS_FOUND!>override tailrec fun foo(s: String): String<!> {
override <!NO_TAIL_CALLS_FOUND!>tailrec<!> fun foo(s: String): String {
return if (s == "OK") s else foo()
}
}
@@ -12,7 +12,7 @@
class C {
companion object {
<!NO_TAIL_CALLS_FOUND!>tailrec fun rec(i: Int)<!> {
<!NO_TAIL_CALLS_FOUND!>tailrec<!> fun rec(i: Int) {
if (i <= 0) return
C.<!NON_TAIL_RECURSIVE_CALL!>rec<!>(i - 1)
}