mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-16 08:31:35 +00:00
11 lines
228 B
Kotlin
Vendored
11 lines
228 B
Kotlin
Vendored
open class A {
|
|
open fun foo(s: String = "OK") = s
|
|
}
|
|
|
|
class B : A() {
|
|
<!NO_TAIL_CALLS_FOUND!>override tailrec fun foo(s: String): String<!> {
|
|
return if (s == "OK") s else foo()
|
|
}
|
|
}
|
|
|
|
fun box() = B().foo("FAIL") |