Deserialize constructors and properties with version requirement 1.3
if they have suspend function type in their descriptors. Also, review fixes. #KT-25256: Fixed
This commit is contained in:
@@ -27,6 +27,6 @@ fun ok(continuation: Continuation<String>): Any? {
|
||||
fun box(): String {
|
||||
if ((::ok).builder() != "OK") return "FAIL 1"
|
||||
if (({ cont: Continuation<String> -> "OK" }).builder() != "OK") return "FAIL 2"
|
||||
if ((fun (cont: Continuation<String>): Any? = "OK").builder() != "OK") return "FAIL 2"
|
||||
if ((fun (cont: Continuation<String>): Any? = "OK").builder() != "OK") return "FAIL 3"
|
||||
return "OK"
|
||||
}
|
||||
|
||||
@@ -7,6 +7,23 @@ suspend fun String.dummy() = this + "K"
|
||||
|
||||
suspend fun String.dummy(s: String) = this + s
|
||||
|
||||
class C {
|
||||
suspend fun dummy() = "OK"
|
||||
}
|
||||
|
||||
class WithNested {
|
||||
class Nested {
|
||||
suspend fun dummy() = "OK"
|
||||
}
|
||||
}
|
||||
|
||||
class WithInner {
|
||||
inner class Inner {
|
||||
suspend fun dummy() = "OK"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// FILE: B.kt
|
||||
// LANGUAGE_VERSION: 1.3
|
||||
import kotlin.coroutines.experimental.*
|
||||
@@ -23,5 +40,8 @@ fun box(): String {
|
||||
if (dummy(continuation) != "OK") return "FAIL 1"
|
||||
if ("O".dummy(continuation) != "OK") return "FAIL 2"
|
||||
if ("O".dummy("K", continuation) != "OK") return "FAIL 3"
|
||||
if (C().dummy(continuation) != "OK") return "FAIL 4"
|
||||
if (WithNested.Nested().dummy(continuation) != "OK") return "FAIL 5"
|
||||
if (WithInner().Inner().dummy(continuation) != "OK") return "FAIL 6"
|
||||
return "OK"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user