Use codegen box tests for tail calls as diagnostic tests too
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
tailRecursive fun test(x : Int, e : Any) : Unit {
|
||||
if (x == 1) {
|
||||
test(x - 1, "tail")
|
||||
@@ -5,7 +7,7 @@ tailRecursive fun test(x : Int, e : Any) : Unit {
|
||||
test(x - 1, "tail")
|
||||
return
|
||||
} else if (x == 3) {
|
||||
test(x - 1, "no tail")
|
||||
<!NON_TAIL_RECURSIVE_CALL!>test<!>(x - 1, "no tail")
|
||||
if (x == 3) {
|
||||
test(x - 1, "tail")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user