e9c9d5731e
This is in preparation for enabling the tests for FIR which will be easier to do when the tests are on the new infrastructure.
36 lines
545 B
Kotlin
Vendored
36 lines
545 B
Kotlin
Vendored
// FILE: foo.kt
|
|
import bar
|
|
fun foo(x: Int): Int {
|
|
if (x >= 0) { // 4
|
|
return x // 5
|
|
}
|
|
return bar(x) // 7
|
|
}
|
|
|
|
// FILE: test.kt
|
|
import foo
|
|
fun box() {
|
|
foo(-3) //4
|
|
}
|
|
|
|
fun bar(x: Int) =
|
|
if (x < 0) { //8
|
|
foo(0)
|
|
} else { // 10
|
|
foo(x)
|
|
}
|
|
|
|
// EXPECTATIONS
|
|
// test.kt:13 box
|
|
// foo.kt:4 foo
|
|
// foo.kt:7 foo
|
|
// test.kt:17 bar
|
|
// test.kt:18 bar
|
|
// foo.kt:4 foo
|
|
// foo.kt:5 foo
|
|
// test.kt:18 bar
|
|
// test.kt:21 bar
|
|
// foo.kt:7 foo
|
|
// test.kt:13 box
|
|
// test.kt:14 box
|