Files
kotlin-fork/compiler/testData/diagnostics/tests/tailRecWithExtensionReceiver.kt
T
Tianyu Geng 5252effb10 FIR checker: report tailrec problems on the keyword
FE1.0 reports it on the declaration signature. This is not ideal so we
move it to the `tailrec` keyword in FIR.
2021-09-28 22:30:09 +03:00

15 lines
233 B
Kotlin
Vendored

// FIR_IDENTICAL
tailrec fun String.foo1() {
"".foo1()
}
tailrec fun String.foo2() {
this.foo2()
}
<!NO_TAIL_CALLS_FOUND!>tailrec<!> fun String.foo3() {
with(this) {
<!NON_TAIL_RECURSIVE_CALL!>foo3<!>()
}
}