JvmDefault. Allow non default inheritance with special flag

#KT-47000
This commit is contained in:
Mikhael Bogdanov
2021-10-30 15:00:15 +02:00
parent c9e7c5d156
commit afc149d460
24 changed files with 461 additions and 6 deletions
@@ -337,6 +337,9 @@ class K2JVMCompilerArguments : CommonCompilerArguments() {
)
var jvmDefault: String by FreezableVar(JvmDefaultMode.DEFAULT.description)
@Argument(value = "-Xjvm-default-allow-non-default-inheritance", description = "Allow inheritance from 'all*' modes for 'disable' one")
var jvmDefaultAllowDisableAgainstAll: Boolean by FreezableVar(false)
@Argument(
value = "-Xdefault-script-extension",
valueDescription = "<script filename extension>",
@@ -531,6 +534,7 @@ default: `indy-with-constants` for JVM target 9 or greater, `inline` otherwise""
result[AnalysisFlags.allowUnstableDependencies] = allowUnstableDependencies || useFir
result[JvmAnalysisFlags.disableUltraLightClasses] = disableUltraLightClasses
result[JvmAnalysisFlags.useIR] = !useOldBackend
result[JvmAnalysisFlags.jvmDefaultAllowNonDefaultInheritance] = jvmDefaultAllowDisableAgainstAll
return result
}