FIR checker: report tailrec problems on the keyword
FE1.0 reports it on the declaration signature. This is not ideal so we move it to the `tailrec` keyword in FIR.
This commit is contained in:
committed by
teamcityserver
parent
922ae607f6
commit
5252effb10
@@ -5,7 +5,7 @@ object O {
|
||||
}
|
||||
|
||||
class A {
|
||||
<!NO_TAIL_CALLS_FOUND!>tailrec fun foo(i: Int)<!> = if (i < 0) 0 else A.foo(i - 1)
|
||||
<!NO_TAIL_CALLS_FOUND!>tailrec<!> fun foo(i: Int) = if (i < 0) 0 else A.foo(i - 1)
|
||||
|
||||
companion object {
|
||||
fun foo(i: Int) = 42 + i
|
||||
@@ -13,5 +13,5 @@ class A {
|
||||
}
|
||||
|
||||
class B {
|
||||
<!NO_TAIL_CALLS_FOUND!>tailrec fun foo(i: Int)<!> = if (i < 0) 0 else O.foo(i - 1)
|
||||
}
|
||||
<!NO_TAIL_CALLS_FOUND!>tailrec<!> fun foo(i: Int) = if (i < 0) 0 else O.foo(i - 1)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user