Fix annotation deserialization on suspend functions
Use proper initial/frontend version of suspend descriptor when writing METHOD_FOR_FUNCTION, because serializer uses this version Also this commit contains adjustments of neighboring code to the describe change #KT-16093 Fixed
This commit is contained in:
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
// !API_VERSION: 1.1
|
||||
// SKIP_TXT
|
||||
|
||||
import kotlin.coroutines.experimental.*
|
||||
import kotlin.coroutines.experimental.intrinsics.*
|
||||
|
||||
suspend fun foo(): Unit = suspendCoroutine {
|
||||
it.resume(Unit)
|
||||
}
|
||||
|
||||
suspend fun bar(): Unit = suspendCoroutineOrReturn {
|
||||
it.resume(Unit)
|
||||
COROUTINE_SUSPENDED
|
||||
}
|
||||
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
// !API_VERSION: 1.0
|
||||
// SKIP_TXT
|
||||
|
||||
import kotlin.coroutines.experimental.*
|
||||
import kotlin.coroutines.experimental.intrinsics.*
|
||||
|
||||
suspend fun foo(): Unit = <!UNRESOLVED_REFERENCE!>suspendCoroutine<!> {
|
||||
<!UNRESOLVED_REFERENCE!>it<!>.<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>resume<!>(Unit)
|
||||
}
|
||||
|
||||
suspend fun bar(): Unit = <!UNRESOLVED_REFERENCE!>suspendCoroutineOrReturn<!> {
|
||||
<!UNRESOLVED_REFERENCE!>it<!>.<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>resume<!>(Unit)
|
||||
<!UNRESOLVED_REFERENCE!>COROUTINE_SUSPENDED<!>
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
//ALLOW_AST_ACCESS
|
||||
package test
|
||||
|
||||
annotation class Anno(val t: String)
|
||||
@Anno("foo") suspend fun foo() {}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package test
|
||||
|
||||
@test.Anno(t = "foo") public suspend fun foo(): kotlin.Unit
|
||||
|
||||
public final annotation class Anno : kotlin.Annotation {
|
||||
/*primary*/ public constructor Anno(/*0*/ t: kotlin.String)
|
||||
public final val t: kotlin.String
|
||||
public final fun <get-t>(): kotlin.String
|
||||
}
|
||||
Reference in New Issue
Block a user