Mark expect/actual classifiers as experimental
^KT-61573 Fixed Review: https://jetbrains.team/p/kt/reviews/11969/timeline Tests: - MultiPlatformIntegrationTestGenerated - CliTestGenerated - MultiPlatformIntegrationTestGenerated - DiagnosticTestGenerated.Multiplatform - FirLightTreeOldFrontendDiagnosticsTestGenerated Also add -Xexpect-actual-classes flag to all necessary ./libraries/* modules Otherwise compilation of those modules failes because of `-Werror`
This commit is contained in:
+1
@@ -31,6 +31,7 @@ fun copyCommonCompilerArguments(from: CommonCompilerArguments, to: CommonCompile
|
||||
to.effectSystem = from.effectSystem
|
||||
to.enableBuilderInference = from.enableBuilderInference
|
||||
to.enableSignatureClashChecks = from.enableSignatureClashChecks
|
||||
to.expectActualClasses = from.expectActualClasses
|
||||
to.expectActualLinker = from.expectActualLinker
|
||||
to.experimental = from.experimental?.copyOf()
|
||||
to.explicitApi = from.explicitApi
|
||||
|
||||
+12
@@ -632,6 +632,17 @@ abstract class CommonCompilerArguments : CommonToolArguments() {
|
||||
field = value
|
||||
}
|
||||
|
||||
@Argument(
|
||||
value = "-Xexpect-actual-classes",
|
||||
description = "The expect/actual classes (including interfaces, objects, annotations, enums, actual typealiases) are an experimental feature.\n" +
|
||||
"Kotlin reports a warning every time you use them. You can use this flag to mute the warning."
|
||||
)
|
||||
var expectActualClasses = false
|
||||
set(value) {
|
||||
checkFrozen()
|
||||
field = value
|
||||
}
|
||||
|
||||
@Argument(
|
||||
value = "-Xunrestricted-builder-inference",
|
||||
description = "Eliminate builder inference restrictions like allowance of returning type variables of a builder inference call"
|
||||
@@ -796,6 +807,7 @@ abstract class CommonCompilerArguments : CommonToolArguments() {
|
||||
put(AnalysisFlags.extendedCompilerChecks, extendedCompilerChecks)
|
||||
put(AnalysisFlags.allowKotlinPackage, allowKotlinPackage)
|
||||
put(AnalysisFlags.builtInsFromSources, builtInsFromSources)
|
||||
put(AnalysisFlags.muteExpectActualClassesWarning, expectActualClasses)
|
||||
put(AnalysisFlags.allowFullyQualifiedNameInKClass, true)
|
||||
put(AnalysisFlags.dontWarnOnErrorSuppression, dontWarnOnErrorSuppression)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user