Introduce -Xinline-classes compiler flag as more priority than -XXLanguage:+InlineClasses

This commit is contained in:
Victor Petukhov
2019-07-26 08:56:04 +03:00
parent 45644c224e
commit 944ee8fcd5
3 changed files with 12 additions and 0 deletions
@@ -128,6 +128,12 @@ abstract class CommonCompilerArguments : CommonToolArguments() {
)
var newInference: Boolean by FreezableVar(false)
@Argument(
value = "-Xinline-classes",
description = "Enable experimental inline classes"
)
var inlineClasses: Boolean by FreezableVar(false)
@Argument(
value = "-Xlegacy-smart-cast-after-try",
description = "Allow var smart casts despite assignment in try block"
@@ -326,6 +332,10 @@ abstract class CommonCompilerArguments : CommonToolArguments() {
put(LanguageFeature.SamConversionPerArgument, LanguageFeature.State.ENABLED)
}
if (inlineClasses) {
put(LanguageFeature.InlineClasses, LanguageFeature.State.ENABLED)
}
if (legacySmartCastAfterTry) {
put(LanguageFeature.SoundSmartCastsAfterTry, LanguageFeature.State.DISABLED)
}