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.
This commit is contained in:
Tianyu Geng
2021-09-23 20:34:27 -07:00
committed by teamcityserver
parent 922ae607f6
commit 5252effb10
26 changed files with 86 additions and 74 deletions
+4 -4
View File
@@ -1,5 +1,5 @@
// FIR_IDENTICAL
<!NO_TAIL_CALLS_FOUND!>tailrec fun foo1()<!> {
<!NO_TAIL_CALLS_FOUND!>tailrec<!> fun foo1() {
try {
<!TAIL_RECURSION_IN_TRY_IS_NOT_SUPPORTED!>foo1<!>()
} catch (e: Exception) {
@@ -9,7 +9,7 @@
}
}
<!NO_TAIL_CALLS_FOUND!>tailrec fun foo2()<!> {
<!NO_TAIL_CALLS_FOUND!>tailrec<!> fun foo2() {
try {
<!TAIL_RECURSION_IN_TRY_IS_NOT_SUPPORTED!>foo2<!>()
foo1()
@@ -22,7 +22,7 @@
}
}
<!NO_TAIL_CALLS_FOUND!>tailrec fun foo3()<!> {
<!NO_TAIL_CALLS_FOUND!>tailrec<!> fun foo3() {
try {
try {
<!TAIL_RECURSION_IN_TRY_IS_NOT_SUPPORTED!>foo3<!>()
@@ -41,7 +41,7 @@
}
}
<!NO_TAIL_CALLS_FOUND!>tailrec fun foo4()<!> {
<!NO_TAIL_CALLS_FOUND!>tailrec<!> fun foo4() {
try {
if (true) {
<!TAIL_RECURSION_IN_TRY_IS_NOT_SUPPORTED!>foo4<!>()