mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-04-22 00:21:28 +00:00
Introduce -Xpolymorphic-signature compiler flag as more priority than -XXLanguage:+PolymorphicSignature
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
1
compiler/testData/cli/js/jsExtraHelp.out
vendored
1
compiler/testData/cli/js/jsExtraHelp.out
vendored
@@ -39,6 +39,7 @@ where advanced options include:
|
||||
-Xphases-to-validate-after Validate backend state after these phases
|
||||
-Xphases-to-validate-before Validate backend state before these phases
|
||||
-Xplugin=<path> Load plugins from the given classpath
|
||||
-Xpolymorphic-signature Enable experimental support for @PolymorphicSignature (MethodHandle/VarHandle)
|
||||
-Xprofile-phases Profile backend phases
|
||||
-Xproper-ieee754-comparisons Generate proper IEEE 754 comparisons in all cases if values are statically known to be of primitive numeric types
|
||||
-Xread-deserialized-contracts Enable reading of contracts from metadata
|
||||
|
||||
1
compiler/testData/cli/jvm/extraHelp.out
vendored
1
compiler/testData/cli/jvm/extraHelp.out
vendored
@@ -101,6 +101,7 @@ where advanced options include:
|
||||
-Xphases-to-validate-after Validate backend state after these phases
|
||||
-Xphases-to-validate-before Validate backend state before these phases
|
||||
-Xplugin=<path> Load plugins from the given classpath
|
||||
-Xpolymorphic-signature Enable experimental support for @PolymorphicSignature (MethodHandle/VarHandle)
|
||||
-Xprofile-phases Profile backend phases
|
||||
-Xproper-ieee754-comparisons Generate proper IEEE 754 comparisons in all cases if values are statically known to be of primitive numeric types
|
||||
-Xread-deserialized-contracts Enable reading of contracts from metadata
|
||||
|
||||
Reference in New Issue
Block a user