IR: make calls with explicit singleton receiver tailrec [KT-48602]
This commit is contained in:
committed by
TeamCityServer
parent
8525b4932b
commit
3c84fbcab1
@@ -1,5 +1,6 @@
|
||||
// FIR_IDENTICAL
|
||||
object O {
|
||||
// foo is the same, but the compiler currently doesn't compile this as tail recursive. See KT-48602
|
||||
// tailrec since `O` is a singleton
|
||||
tailrec fun foo(i: Int): Int = if (i < 0) 0 else O.foo(i - 1)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user