[IR] Correct line number on suspend function with implicit unit return

This commit is contained in:
Kristoffer Andersen
2020-11-03 20:13:55 +01:00
committed by max-kammerer
parent c2fec38384
commit 297c33b452
5 changed files with 69 additions and 1 deletions
@@ -0,0 +1,19 @@
// WITH_COROUTINES
// FILE: test.kt
suspend fun foo(block: Long.() -> String): String {
return 1L.block()
}
suspend fun box() {
foo {
"OK"
}
}
// LINENUMBERS
// test.kt:8 box
// test.kt:4 foo
// test.kt:9 invoke
// test.kt:4 foo
// test.kt:8 box
// test.kt:11 box
@@ -0,0 +1,25 @@
// WITH_COROUTINES
// FILE: test.kt
suspend fun foo(block: suspend Long.() -> String): String {
return 1L.block()
}
suspend fun box() {
foo {
"OK"
}
}
// LINENUMBERS
// test.kt:8 box
// test.kt:4 foo
// CoroutineUtil.kt:28 getContext
// test.kt:-1 <init>
// test.kt:-1 create
// test.kt:-1 invoke
// test.kt:8 invokeSuspend
// test.kt:9 invokeSuspend
// test.kt:-1 invoke
// test.kt:4 foo
// test.kt:8 box
// test.kt:11 box