Add test for calling release coroutine from experimental one
This commit is contained in:
+3
@@ -0,0 +1,3 @@
|
||||
suspend fun callRelease() {
|
||||
dummy()
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
suspend fun dummy() {}
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/releaseCoroutineCallFromExperimental/output.txt
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
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()
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
+11
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||
* that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
@@ -432,6 +432,16 @@ class CompileKotlinAgainstCustomBinariesTest : AbstractKotlinCompilerIntegration
|
||||
compileKotlin("source.kt", tmpdir, listOf(library))
|
||||
}
|
||||
|
||||
fun testReleaseCoroutineCallFromExperimental() {
|
||||
val library = compileLibrary("library", additionalOptions = listOf("-language-version", "1.3"), checkKotlinOutput = {})
|
||||
compileKotlin(
|
||||
"experimental.kt",
|
||||
tmpdir,
|
||||
listOf(library),
|
||||
additionalOptions = listOf("-language-version", "1.2", "-Xskip-metadata-version-check")
|
||||
)
|
||||
}
|
||||
|
||||
companion object {
|
||||
// compiler before 1.1.4 version did not include suspension marks into bytecode.
|
||||
private fun stripSuspensionMarksToImitateLegacyCompiler(bytes: ByteArray): Pair<ByteArray, Int> {
|
||||
|
||||
Reference in New Issue
Block a user