mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-11 08:31:30 +00:00
17 lines
410 B
Kotlin
Vendored
17 lines
410 B
Kotlin
Vendored
// IGNORE_BACKEND_FIR: JVM_IR
|
|
// IGNORE_BACKEND: JS_IR
|
|
// TODO: muted automatically, investigate should it be ran for JS or not
|
|
// DONT_RUN_GENERATED_CODE: JS
|
|
// IGNORE_BACKEND: 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") |