Take java 9 modules into account in coroutines debug metadata

reading
 #KT-28237
This commit is contained in:
Ilmir Usmanov
2018-11-20 23:05:50 +03:00
parent bdd1eef39a
commit 1336e8f3e3
6 changed files with 91 additions and 14 deletions
@@ -0,0 +1 @@
usage/some.module.withsome.packages.Test
@@ -0,0 +1 @@
OK
@@ -0,0 +1,3 @@
module usage {
requires kotlin.stdlib;
}
@@ -0,0 +1,21 @@
@file:Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER", "CANNOT_OVERRIDE_INVISIBLE_MEMBER")
package some.module.withsome.packages
import java.lang.RuntimeException
import kotlin.coroutines.intrinsics.suspendCoroutineUninterceptedOrReturn
import kotlin.coroutines.jvm.internal.BaseContinuationImpl
suspend fun dummy() {}
class Test {
suspend fun getStackTraceElement(): StackTraceElement {
dummy() // to force state-machine generation
return suspendCoroutineUninterceptedOrReturn<StackTraceElement> {
(it as BaseContinuationImpl).getStackTraceElement()
}
}
}
suspend fun main() {
println(Test().getStackTraceElement().className)
}