From 7982f3489e0fe1c3ea2c98aec5bd19c87b3ec10e Mon Sep 17 00:00:00 2001 From: Stanislav Erokhin Date: Fri, 15 Sep 2017 15:00:43 +0300 Subject: [PATCH] Rename compiler key -Xno-check-impl to -Xno-check-actual --- .../kotlin/cli/common/arguments/CommonCompilerArguments.kt | 6 +++--- .../kotlin/diagnostics/rendering/DefaultErrorMessages.java | 2 +- .../resolve/checkers/ExpectedActualDeclarationChecker.kt | 2 +- compiler/testData/cli/js/jsExtraHelp.out | 2 +- compiler/testData/cli/jvm/extraHelp.out | 2 +- .../simpleNoImplKeywordOnTopLevelFunction/output.txt | 2 +- .../util/src/org/jetbrains/kotlin/config/AnalysisFlag.kt | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/CommonCompilerArguments.kt b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/CommonCompilerArguments.kt index 4ffa0c7ec13..de31381bfe7 100644 --- a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/CommonCompilerArguments.kt +++ b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/CommonCompilerArguments.kt @@ -89,8 +89,8 @@ abstract class CommonCompilerArguments : CommonToolArguments() { @Argument(value = "-Xmulti-platform", description = "Enable experimental language support for multi-platform projects") var multiPlatform: Boolean by FreezableVar(false) - @Argument(value = "-Xno-check-impl", description = "Do not check presence of 'impl' modifier in multi-platform projects") - var noCheckImpl: Boolean by FreezableVar(false) + @Argument(value = "-Xno-check-actual", description = "Do not check presence of 'actual' modifier in multi-platform projects") + var noCheckActual: Boolean by FreezableVar(false) @Argument( value = "-Xintellij-plugin-root", @@ -109,7 +109,7 @@ abstract class CommonCompilerArguments : CommonToolArguments() { open fun configureAnalysisFlags(collector: MessageCollector): MutableMap, Any> { return HashMap, Any>().apply { put(AnalysisFlag.skipMetadataVersionCheck, skipMetadataVersionCheck) - put(AnalysisFlag.multiPlatformDoNotCheckImpl, noCheckImpl) + put(AnalysisFlag.multiPlatformDoNotCheckActual, noCheckActual) } } diff --git a/compiler/frontend/src/org/jetbrains/kotlin/diagnostics/rendering/DefaultErrorMessages.java b/compiler/frontend/src/org/jetbrains/kotlin/diagnostics/rendering/DefaultErrorMessages.java index 378e886d921..9f10dd207cf 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/diagnostics/rendering/DefaultErrorMessages.java +++ b/compiler/frontend/src/org/jetbrains/kotlin/diagnostics/rendering/DefaultErrorMessages.java @@ -282,7 +282,7 @@ public class DefaultErrorMessages { MAP.put(NO_ACTUAL_CLASS_MEMBER_FOR_EXPECTED_CLASS, "''impl'' class ''{0}'' has no implementation of ''header'' class members:{1}", NAME, IncompatibleHeaderImplClassScopesRenderer.TEXT); - MAP.put(ACTUAL_MISSING, "Declaration should be marked with 'impl' (suppress with -Xno-check-impl)"); + MAP.put(ACTUAL_MISSING, "Declaration should be marked with 'actual' (suppress with -Xno-check-actual)"); MAP.put(PROJECTION_ON_NON_CLASS_TYPE_ARGUMENT, "Projections are not allowed on type arguments of functions and properties"); MAP.put(SUPERTYPE_NOT_INITIALIZED, "This type has a constructor, and thus must be initialized here"); diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/checkers/ExpectedActualDeclarationChecker.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/checkers/ExpectedActualDeclarationChecker.kt index 857276882c2..94c7c958e2e 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/checkers/ExpectedActualDeclarationChecker.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/checkers/ExpectedActualDeclarationChecker.kt @@ -65,7 +65,7 @@ object ExpectedActualDeclarationChecker : DeclarationChecker { checkExpectedDeclarationHasActual(declaration, descriptor, diagnosticHolder, descriptor.module) } else { - val checkExpected = !languageVersionSettings.getFlag(AnalysisFlag.multiPlatformDoNotCheckImpl) + val checkExpected = !languageVersionSettings.getFlag(AnalysisFlag.multiPlatformDoNotCheckActual) checkActualDeclarationHasExpected(declaration, descriptor, diagnosticHolder, checkExpected) } } diff --git a/compiler/testData/cli/js/jsExtraHelp.out b/compiler/testData/cli/js/jsExtraHelp.out index 6ee7dc01c4b..3706a876a31 100644 --- a/compiler/testData/cli/js/jsExtraHelp.out +++ b/compiler/testData/cli/js/jsExtraHelp.out @@ -8,7 +8,7 @@ where advanced options include: Enable coroutines or report warnings or errors on declarations and use sites of 'suspend' modifier -Xintellij-plugin-root= Path to the kotlin-compiler.jar or directory where IntelliJ configuration files can be found -Xmulti-platform Enable experimental language support for multi-platform projects - -Xno-check-impl Do not check presence of 'impl' modifier in multi-platform projects + -Xno-check-actual Do not check presence of 'impl' modifier in multi-platform projects -Xno-inline Disable method inlining -Xplugin= Load plugins from the given classpath -Xrepeat= Repeat compilation (for performance analysis) diff --git a/compiler/testData/cli/jvm/extraHelp.out b/compiler/testData/cli/jvm/extraHelp.out index 8c38854f147..0d118377566 100644 --- a/compiler/testData/cli/jvm/extraHelp.out +++ b/compiler/testData/cli/jvm/extraHelp.out @@ -30,7 +30,7 @@ where advanced options include: Enable coroutines or report warnings or errors on declarations and use sites of 'suspend' modifier -Xintellij-plugin-root= Path to the kotlin-compiler.jar or directory where IntelliJ configuration files can be found -Xmulti-platform Enable experimental language support for multi-platform projects - -Xno-check-impl Do not check presence of 'impl' modifier in multi-platform projects + -Xno-check-actual Do not check presence of 'impl' modifier in multi-platform projects -Xno-inline Disable method inlining -Xplugin= Load plugins from the given classpath -Xrepeat= Repeat compilation (for performance analysis) diff --git a/compiler/testData/multiplatform/simpleNoImplKeywordOnTopLevelFunction/output.txt b/compiler/testData/multiplatform/simpleNoImplKeywordOnTopLevelFunction/output.txt index af4ba44896f..1d624d94df6 100644 --- a/compiler/testData/multiplatform/simpleNoImplKeywordOnTopLevelFunction/output.txt +++ b/compiler/testData/multiplatform/simpleNoImplKeywordOnTopLevelFunction/output.txt @@ -5,6 +5,6 @@ Output: -- JVM -- Exit code: COMPILATION_ERROR Output: -compiler/testData/multiplatform/simpleNoImplKeywordOnTopLevelFunction/jvm.kt:3:1: error: declaration should be marked with 'impl' (suppress with -Xno-check-impl) +compiler/testData/multiplatform/simpleNoImplKeywordOnTopLevelFunction/jvm.kt:3:1: error: declaration should be marked with 'actual' (suppress with -Xno-check-actual) fun foo(s: String): Array = arrayOf(s) ^ diff --git a/compiler/util/src/org/jetbrains/kotlin/config/AnalysisFlag.kt b/compiler/util/src/org/jetbrains/kotlin/config/AnalysisFlag.kt index 31a2a714e46..223f60ea81f 100644 --- a/compiler/util/src/org/jetbrains/kotlin/config/AnalysisFlag.kt +++ b/compiler/util/src/org/jetbrains/kotlin/config/AnalysisFlag.kt @@ -49,7 +49,7 @@ class AnalysisFlag internal constructor( val skipMetadataVersionCheck by Flag.Boolean @JvmStatic - val multiPlatformDoNotCheckImpl by Flag.Boolean + val multiPlatformDoNotCheckActual by Flag.Boolean @JvmStatic val jsr305 by Flag.Jsr305StateWarnByDefault