[FIR] Implement flag for disabling warning on error suppression
#KT-61129
This commit is contained in:
committed by
Space Team
parent
c32a0a83f9
commit
969c716c76
+1
@@ -24,6 +24,7 @@ fun copyCommonCompilerArguments(from: CommonCompilerArguments, to: CommonCompile
|
||||
to.disableDefaultScriptingPlugin = from.disableDefaultScriptingPlugin
|
||||
to.disablePhases = from.disablePhases?.copyOf()
|
||||
to.disableUltraLightClasses = from.disableUltraLightClasses
|
||||
to.dontWarnOnErrorSuppression = from.dontWarnOnErrorSuppression
|
||||
to.dumpDirectory = from.dumpDirectory
|
||||
to.dumpOnlyFqName = from.dumpOnlyFqName
|
||||
to.dumpPerf = from.dumpPerf
|
||||
|
||||
+11
@@ -763,6 +763,16 @@ abstract class CommonCompilerArguments : CommonToolArguments() {
|
||||
field = value
|
||||
}
|
||||
|
||||
@Argument(
|
||||
value = "-Xdont-warn-on-error-suppression",
|
||||
description = "Don't report a warning when an error is suppressed. Only affects K2."
|
||||
)
|
||||
var dontWarnOnErrorSuppression = false
|
||||
set(value) {
|
||||
checkFrozen()
|
||||
field = value
|
||||
}
|
||||
|
||||
@OptIn(IDEAPluginsCompatibilityAPI::class)
|
||||
open fun configureAnalysisFlags(collector: MessageCollector, languageVersion: LanguageVersion): MutableMap<AnalysisFlag<*>, Any> {
|
||||
return HashMap<AnalysisFlag<*>, Any>().apply {
|
||||
@@ -787,6 +797,7 @@ abstract class CommonCompilerArguments : CommonToolArguments() {
|
||||
put(AnalysisFlags.allowKotlinPackage, allowKotlinPackage)
|
||||
put(AnalysisFlags.builtInsFromSources, builtInsFromSources)
|
||||
put(AnalysisFlags.allowFullyQualifiedNameInKClass, true)
|
||||
put(AnalysisFlags.dontWarnOnErrorSuppression, dontWarnOnErrorSuppression)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user