Make FE1.0 report tailrec diagnostics on the keyword

This commit is contained in:
Tianyu Geng
2021-09-27 11:37:00 -07:00
committed by teamcityserver
parent 5252effb10
commit a5435c0efc
7 changed files with 27 additions and 27 deletions
@@ -1,6 +1,6 @@
// WITH_STDLIB
<!NO_TAIL_CALLS_FOUND!>tailrec fun foo1()<!> {
<!NO_TAIL_CALLS_FOUND!>tailrec<!> fun foo1() {
run {
<!NON_TAIL_RECURSIVE_CALL!>foo1<!>()
}
@@ -9,13 +9,13 @@
fun myRun(f: () -> Unit) = f()
<!NO_TAIL_CALLS_FOUND!>tailrec fun foo2()<!> {
<!NO_TAIL_CALLS_FOUND!>tailrec<!> fun foo2() {
myRun {
<!NON_TAIL_RECURSIVE_CALL!>foo2<!>()
}
}
<!NO_TAIL_CALLS_FOUND!>tailrec fun foo3()<!> {
<!NO_TAIL_CALLS_FOUND!>tailrec<!> fun foo3() {
fun bar() {
<!NON_TAIL_RECURSIVE_CALL!>foo3<!>()
}
@@ -23,7 +23,7 @@ fun myRun(f: () -> Unit) = f()
}
class A {
<!NO_TAIL_CALLS_FOUND!>tailrec fun foo4()<!> {
<!NO_TAIL_CALLS_FOUND!>tailrec<!> fun foo4() {
with(this) {
<!NON_TAIL_RECURSIVE_CALL!>foo4<!>()
}