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:
@@ -0,0 +1,7 @@
|
||||
$TESTDATA_DIR$/releaseCoroutinesApiVersion1.2.kt
|
||||
-d
|
||||
$TEMP_DIR$
|
||||
-language-version
|
||||
1.3
|
||||
-api-version
|
||||
1.2
|
||||
@@ -0,0 +1,13 @@
|
||||
suspend fun dummy() {}
|
||||
|
||||
val c: suspend () -> Unit = {}
|
||||
|
||||
fun builder(c: suspend () -> Unit) {}
|
||||
|
||||
val d = suspend {}
|
||||
|
||||
suspend fun check() {
|
||||
dummy()
|
||||
c()
|
||||
builder {}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
warning: language version 1.3 is experimental, there are no backwards compatibility guarantees for new language and library features
|
||||
compiler/testData/cli/jvm/releaseCoroutinesApiVersion1.2.kt:1:1: error: unsupported [cannot use release coroutines with api version less than 1.3]
|
||||
suspend fun dummy() {}
|
||||
^
|
||||
compiler/testData/cli/jvm/releaseCoroutinesApiVersion1.2.kt:3:8: error: unsupported [cannot use release coroutines with api version less than 1.3]
|
||||
val c: suspend () -> Unit = {}
|
||||
^
|
||||
compiler/testData/cli/jvm/releaseCoroutinesApiVersion1.2.kt:5:16: error: unsupported [cannot use release coroutines with api version less than 1.3]
|
||||
fun builder(c: suspend () -> Unit) {}
|
||||
^
|
||||
compiler/testData/cli/jvm/releaseCoroutinesApiVersion1.2.kt:7:9: error: unsupported [cannot use release coroutines with api version less than 1.3]
|
||||
val d = suspend {}
|
||||
^
|
||||
compiler/testData/cli/jvm/releaseCoroutinesApiVersion1.2.kt:9:1: error: unsupported [cannot use release coroutines with api version less than 1.3]
|
||||
suspend fun check() {
|
||||
^
|
||||
compiler/testData/cli/jvm/releaseCoroutinesApiVersion1.2.kt:12:5: error: unsupported [cannot use release coroutines with api version less than 1.3]
|
||||
builder {}
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
Reference in New Issue
Block a user