[IDE] Propagate KotlinFacetSettings version and completely drop isReleaseCoroutines flag

Also this commit removes number of tests related to support
  experimental coroutines
This commit is contained in:
Dmitriy Novozhilov
2020-12-29 13:47:21 +03:00
committed by TeamCityServer
parent e991c9d476
commit af94bcebea
26 changed files with 104 additions and 189 deletions
@@ -1,9 +0,0 @@
// ADDITIONAL_COMPILER_ARGUMENTS: -Xcoroutines=enable
fun f(g: suspend () -> Unit): Any = g
suspend fun h() = f { }
expect suspend fun k()
expect fun l(g: suspend () -> Unit): Any
@@ -1,4 +0,0 @@
-- Common --
Exit code: OK
Output:
warning: -Xcoroutines has no effect: coroutines are enabled anyway in 1.3 and beyond
@@ -34,11 +34,6 @@ public class MultiPlatformIntegrationTestGenerated extends AbstractMultiPlatform
runTest("compiler/testData/multiplatform/compatibleProperties/");
}
@TestMetadata("compilerArguments")
public void testCompilerArguments() throws Exception {
runTest("compiler/testData/multiplatform/compilerArguments/");
}
@TestMetadata("contracts")
public void testContracts() throws Exception {
runTest("compiler/testData/multiplatform/contracts/");
@@ -526,43 +526,6 @@ class CompileKotlinAgainstCustomBinariesTest : AbstractKotlinCompilerIntegration
)
}
fun testObsoleteInlineSuspend() {
val version = intArrayOf(1, 0, 1) // legacy coroutines metadata
val options = listOf("-language-version", "1.2", "-Xcoroutines=enable")
val library = transformJar(
compileLibrary(
"library",
additionalOptions = options,
extraClassPath = listOf(ForTestCompileRuntime.coroutinesCompatForTests()),
checkKotlinOutput = { actual ->
KotlinTestUtils.assertEqualsToFile(File(testDataDirectory, "library.output.txt"), actual)
}
),
{ _, bytes ->
val (resultBytes, removedCounter) = stripSuspensionMarksToImitateLegacyCompiler(
WrongBytecodeVersionTest.transformMetadataInClassFile(bytes) { name, _ ->
if (name == JvmAnnotationNames.BYTECODE_VERSION_FIELD_NAME) version else null
})
// we expect 4 instructions to be removed in this test library
assertEquals(4, removedCounter)
resultBytes
})
compileKotlin(
"source.kt", tmpdir, listOf(library, ForTestCompileRuntime.coroutinesCompatForTests()), K2JVMCompiler(),
additionalOptions = options
)
val classLoader = URLClassLoader(
arrayOf(library.toURI().toURL(), tmpdir.toURI().toURL(), ForTestCompileRuntime.coroutinesCompatForTests().toURI().toURL()),
ForTestCompileRuntime.runtimeJarClassLoader()
)
@Suppress("UNCHECKED_CAST")
val result = classLoader
.loadClass("SourceKt")
.getDeclaredMethod("run")
.invoke(null) as Array<String>
assertEquals(result[0], result[1])
}
fun testInlineFunctionsWithMatchingJvmSignatures() {
val library = compileLibrary(
"library",