diff --git a/compiler/cli/cli-js/src/org/jetbrains/kotlin/cli/js/JSLanguageVersionSettings.kt b/compiler/cli/cli-js/src/org/jetbrains/kotlin/cli/js/JSLanguageVersionSettings.kt deleted file mode 100644 index 9086976b04b..00000000000 --- a/compiler/cli/cli-js/src/org/jetbrains/kotlin/cli/js/JSLanguageVersionSettings.kt +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.cli.js - -import org.jetbrains.kotlin.config.* - -class JSLanguageVersionSettings(private val delegate: LanguageVersionSettings) : LanguageVersionSettings { - companion object { - private val disabledFeatures = setOf( - LanguageFeature.NewInference, - LanguageFeature.FunctionalInterfaceConversion, - LanguageFeature.SamConversionForKotlinFunctions, - LanguageFeature.SamConversionPerArgument, - LanguageFeature.FunctionReferenceWithDefaultValueAsOtherType, - LanguageFeature.NonStrictOnlyInputTypesChecks - ) - } - - override fun getFeatureSupport(feature: LanguageFeature): LanguageFeature.State { - return if (feature in disabledFeatures) - LanguageFeature.State.DISABLED - else - delegate.getFeatureSupport(feature) - } - - override fun isPreRelease(): Boolean = delegate.isPreRelease() - - override fun getFlag(flag: AnalysisFlag): T = delegate.getFlag(flag) - - override val apiVersion: ApiVersion - get() = delegate.apiVersion - - override val languageVersion: LanguageVersion - get() = delegate.languageVersion -} \ No newline at end of file diff --git a/compiler/cli/cli-js/src/org/jetbrains/kotlin/cli/js/K2JSCompiler.java b/compiler/cli/cli-js/src/org/jetbrains/kotlin/cli/js/K2JSCompiler.java index 15f1d7e0264..8db9bb7764b 100644 --- a/compiler/cli/cli-js/src/org/jetbrains/kotlin/cli/js/K2JSCompiler.java +++ b/compiler/cli/cli-js/src/org/jetbrains/kotlin/cli/js/K2JSCompiler.java @@ -1,17 +1,6 @@ /* - * Copyright 2010-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ package org.jetbrains.kotlin.cli.js; @@ -246,13 +235,6 @@ public class K2JSCompiler extends CLICompiler { configuration.put(CommonConfigurationKeys.MODULE_NAME, FileUtil.getNameWithoutExtension(outputFile)); - if (!arguments.getNewInference()) { - CommonConfigurationKeysKt.setLanguageVersionSettings( - configuration, - new JSLanguageVersionSettings(CommonConfigurationKeysKt.getLanguageVersionSettings(configuration)) - ); - } - JsConfig config = new JsConfig(project, configuration); JsConfig.Reporter reporter = new JsConfig.Reporter() { @Override