Kotlin Facet: Avoid rewriting platform version with project settings
#KT-18373 Fixed
This commit is contained in:
@@ -301,17 +301,17 @@ class KotlinFacetEditorGeneralTab(
|
|||||||
useProjectSettings = editor.useProjectSettingsCheckBox.isSelected
|
useProjectSettings = editor.useProjectSettingsCheckBox.isSelected
|
||||||
(editor.targetPlatformComboBox.selectedItem as TargetPlatformKind<*>?)?.let {
|
(editor.targetPlatformComboBox.selectedItem as TargetPlatformKind<*>?)?.let {
|
||||||
if (it != targetPlatformKind) {
|
if (it != targetPlatformKind) {
|
||||||
val newCompilerArguments = it.createCompilerArguments()
|
|
||||||
val platformArguments = when (it) {
|
val platformArguments = when (it) {
|
||||||
is TargetPlatformKind.Jvm -> editor.compilerConfigurable.k2jvmCompilerArguments
|
is TargetPlatformKind.Jvm -> editor.compilerConfigurable.k2jvmCompilerArguments
|
||||||
is TargetPlatformKind.JavaScript -> editor.compilerConfigurable.k2jsCompilerArguments
|
is TargetPlatformKind.JavaScript -> editor.compilerConfigurable.k2jsCompilerArguments
|
||||||
else -> null
|
else -> null
|
||||||
}
|
}
|
||||||
if (platformArguments != null) {
|
compilerArguments = it.createCompilerArguments {
|
||||||
mergeBeans(platformArguments, newCompilerArguments)
|
if (platformArguments != null) {
|
||||||
|
mergeBeans(platformArguments, this)
|
||||||
|
}
|
||||||
|
copyInheritedFields(compilerArguments!!, this)
|
||||||
}
|
}
|
||||||
copyInheritedFields(compilerArguments!!, newCompilerArguments)
|
|
||||||
compilerArguments = newCompilerArguments
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user