Rename compiler key -Xno-check-impl to -Xno-check-actual

This commit is contained in:
Stanislav Erokhin
2017-09-15 15:00:43 +03:00
parent 2fe7cc5534
commit 7982f3489e
7 changed files with 9 additions and 9 deletions
@@ -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<AnalysisFlag<*>, Any> {
return HashMap<AnalysisFlag<*>, Any>().apply {
put(AnalysisFlag.skipMetadataVersionCheck, skipMetadataVersionCheck)
put(AnalysisFlag.multiPlatformDoNotCheckImpl, noCheckImpl)
put(AnalysisFlag.multiPlatformDoNotCheckActual, noCheckActual)
}
}
@@ -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");
@@ -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)
}
}
+1 -1
View File
@@ -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> 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=<path> Load plugins from the given classpath
-Xrepeat=<count> Repeat compilation (for performance analysis)
+1 -1
View File
@@ -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> 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=<path> Load plugins from the given classpath
-Xrepeat=<count> Repeat compilation (for performance analysis)
@@ -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<CharSequence?> = arrayOf(s)
^
@@ -49,7 +49,7 @@ class AnalysisFlag<out T> internal constructor(
val skipMetadataVersionCheck by Flag.Boolean
@JvmStatic
val multiPlatformDoNotCheckImpl by Flag.Boolean
val multiPlatformDoNotCheckActual by Flag.Boolean
@JvmStatic
val jsr305 by Flag.Jsr305StateWarnByDefault