Introduce -Xpolymorphic-signature compiler flag as more priority than -XXLanguage:+PolymorphicSignature
This commit is contained in:
+10
@@ -134,6 +134,12 @@ abstract class CommonCompilerArguments : CommonToolArguments() {
|
||||
)
|
||||
var inlineClasses: Boolean by FreezableVar(false)
|
||||
|
||||
@Argument(
|
||||
value = "-Xpolymorphic-signature",
|
||||
description = "Enable experimental support for @PolymorphicSignature (MethodHandle/VarHandle)"
|
||||
)
|
||||
var polymorphicSignature: Boolean by FreezableVar(false)
|
||||
|
||||
@Argument(
|
||||
value = "-Xlegacy-smart-cast-after-try",
|
||||
description = "Allow var smart casts despite assignment in try block"
|
||||
@@ -336,6 +342,10 @@ abstract class CommonCompilerArguments : CommonToolArguments() {
|
||||
put(LanguageFeature.InlineClasses, LanguageFeature.State.ENABLED)
|
||||
}
|
||||
|
||||
if (polymorphicSignature) {
|
||||
put(LanguageFeature.PolymorphicSignature, LanguageFeature.State.ENABLED)
|
||||
}
|
||||
|
||||
if (legacySmartCastAfterTry) {
|
||||
put(LanguageFeature.SoundSmartCastsAfterTry, LanguageFeature.State.DISABLED)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user