Do not set api version to language version when language version is null
#KT-21852 fixed
#KT-21574 fixed
Original commit: 3f082346ae
This commit is contained in:
@@ -638,6 +638,19 @@ open class KotlinJpsBuildTest : AbstractKotlinJpsBuildTestCase() {
|
||||
assertFilesNotExistInOutput(myProject.modules.get(0), "_DefaultPackage.class")
|
||||
}
|
||||
|
||||
fun testDefaultLanguageVersionCustomApiVersion() {
|
||||
initProject(JVM_FULL_RUNTIME)
|
||||
buildAllModules().assertFailed()
|
||||
|
||||
assertEquals(1, myProject.modules.size)
|
||||
val module = myProject.modules.first()
|
||||
val args = JpsKotlinCompilerSettings.getCommonCompilerArguments(module)
|
||||
args.apiVersion = "1.2"
|
||||
JpsKotlinCompilerSettings.setCommonCompilerArguments(myProject, args)
|
||||
|
||||
buildAllModules().assertSuccessful()
|
||||
}
|
||||
|
||||
fun testKotlinJavaProject() {
|
||||
doTestWithRuntime()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user