Fix generation of JS source maps for suspend functions

This commit is contained in:
Alexey Andreev
2017-05-04 18:45:51 +03:00
parent 28140b0883
commit 3077a0f640
8 changed files with 105 additions and 61 deletions
+17
View File
@@ -0,0 +1,17 @@
import kotlin.coroutines.experimental.*
import kotlin.coroutines.experimental.intrinsics.*
suspend fun foo(value: Int): Int = suspendCoroutineOrReturn { c ->
c.resume(value)
COROUTINE_SUSPENDED
}
suspend fun bar(): Unit {
println("!")
val a = foo(2)
println("!")
val b = foo(3)
println(a + b)
}
// LINES: 4 5 6 * 9 9 9 9 9 9 9 9 * 10 11 11 11 11 11 * 11 12 13 13 13 13 13 13 14