[JVM_IR] Copy offsets from the original function to invokeSuspend.

Otherwise, implicit returns in void returning suspend functions
will not have the line number of the end brace.

Fixes KT-41962 and KT-40464.
This commit is contained in:
Mads Ager
2020-10-14 14:46:55 +02:00
committed by Alexander Udalov
parent 800bfe2cdb
commit ad88c60fd8
8 changed files with 29 additions and 10 deletions
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JVM_IR
LineBreakpoint created at sequenceNested.kt:6
Run Java
Connected to the target VM
@@ -0,0 +1,14 @@
LineBreakpoint created at sequenceNested2.kt:8
Run Java
Connected to the target VM
sequenceNested2.kt:8
sequenceNested2.kt:9
sequenceNested2.kt:10
sequenceNested2.kt:11
sequenceNested2.kt:23
sequenceNested2.kt:23
sequenceNested2.kt:23
sequenceNested2.kt:24
Disconnected from the target VM
Process finished with exit code 0
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JVM_IR
LineBreakpoint created at sequenceNested2.kt:8
Run Java
Connected to the target VM
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JVM_IR
LineBreakpoint created at sequenceSimple.kt:6
Run Java
Connected to the target VM
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JVM_IR
LineBreakpoint created at soSuspendableCallInEndOfFun.kt:29
Run Java
Connected to the target VM