Kotlin Facet: Do not rewrite language/API version based on compiler arguments if they do not contain explicit language/API version

This commit is contained in:
Alexey Sedunov
2017-02-15 12:26:28 +03:00
parent 2790fcf4bd
commit 0d2122bb1d
@@ -242,8 +242,8 @@ fun parseCompilerArgumentsToFacet(arguments: List<String>, defaultArguments: Lis
val restoreCoroutineSupport = val restoreCoroutineSupport =
!compilerArguments.coroutinesEnable && !compilerArguments.coroutinesWarn && !compilerArguments.coroutinesError !compilerArguments.coroutinesEnable && !compilerArguments.coroutinesWarn && !compilerArguments.coroutinesError
versionInfo.apiLevel = LanguageVersion.fromVersionString(compilerArguments.apiVersion) compilerArguments.apiVersion?.let { versionInfo.apiLevel = LanguageVersion.fromVersionString(it) }
versionInfo.languageLevel = LanguageVersion.fromVersionString(compilerArguments.languageVersion) compilerArguments.languageVersion?.let { versionInfo.languageLevel = LanguageVersion.fromVersionString(it) }
if (versionInfo.targetPlatformKind is TargetPlatformKind.Jvm) { if (versionInfo.targetPlatformKind is TargetPlatformKind.Jvm) {
val jvmTarget = compilerInfo.k2jvmCompilerArguments!!.jvmTarget val jvmTarget = compilerInfo.k2jvmCompilerArguments!!.jvmTarget