FIR Checker: check tailrec
Difference from FE1.0 * KT-4285: calls to virtual method with default argument should be reported as not tailrec. FE1.0 is missing such cases. * KT-48600: calls inside lambda should be reported as not tailrec. FE1.0 also misses such cases.
This commit is contained in:
committed by
TeamCityServer
parent
5df316a129
commit
8525b4932b
@@ -1,5 +1,5 @@
|
||||
object O {
|
||||
// This is correct, foo is the same
|
||||
// foo is the same, but the compiler currently doesn't compile this as tail recursive. See KT-48602
|
||||
tailrec fun foo(i: Int): Int = if (i < 0) 0 else O.foo(i - 1)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user