mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
14 lines
338 B
Kotlin
Vendored
14 lines
338 B
Kotlin
Vendored
// TODO: muted automatically, investigate should it be ran for JS or not
|
|
// IGNORE_BACKEND_WITHOUT_CHECK: JS
|
|
|
|
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") |