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:
Ilmir Usmanov
2018-07-10 18:55:09 +03:00
parent c460593b7d
commit 6ba2baa9da
24 changed files with 234 additions and 136 deletions
@@ -1,3 +1,11 @@
suspend fun callRelease() {
dummy()
C().dummy()
// TODO: This should be error
WithNested.Nested().dummy()
// TODO: This should be error
WithInner().Inner().dummy()
}
@@ -1 +1,17 @@
suspend fun dummy() {}
suspend fun dummy() {}
class C {
suspend fun dummy() = "OK"
}
class WithNested {
class Nested {
suspend fun dummy() = "OK"
}
}
class WithInner {
inner class Inner {
suspend fun dummy() = "OK"
}
}
@@ -1,4 +1,7 @@
compiler/testData/compileKotlinAgainstCustomBinaries/releaseCoroutineCallFromExperimental/experimental.kt:2:5: error: 'dummy(): Unit' is only available since Kotlin 1.3 and cannot be used in Kotlin 1.2
dummy()
^
compiler/testData/compileKotlinAgainstCustomBinaries/releaseCoroutineCallFromExperimental/experimental.kt:4:9: error: 'dummy(): String' is only available since Kotlin 1.3 and cannot be used in Kotlin 1.2
C().dummy()
^
COMPILATION_ERROR