mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Add experimental feature flag for Implement 'some'
This commit is contained in:
@@ -138,6 +138,9 @@ EXPERIMENTAL_FEATURE(ParserValidation)
|
|||||||
/// Swift Swift parser.
|
/// Swift Swift parser.
|
||||||
EXPERIMENTAL_FEATURE(ParserSequenceFolding)
|
EXPERIMENTAL_FEATURE(ParserSequenceFolding)
|
||||||
|
|
||||||
|
/// Enables implicit some while also enabling existential `any`
|
||||||
|
EXPERIMENTAL_FEATURE(ImplicitSome)
|
||||||
|
|
||||||
#undef EXPERIMENTAL_FEATURE
|
#undef EXPERIMENTAL_FEATURE
|
||||||
#undef UPCOMING_FEATURE
|
#undef UPCOMING_FEATURE
|
||||||
#undef SUPPRESSIBLE_LANGUAGE_FEATURE
|
#undef SUPPRESSIBLE_LANGUAGE_FEATURE
|
||||||
|
|||||||
@@ -579,6 +579,10 @@ def enable_experimental_associated_type_inference :
|
|||||||
Flag<["-"], "enable-experimental-associated-type-inference">,
|
Flag<["-"], "enable-experimental-associated-type-inference">,
|
||||||
HelpText<"Enable experimental associated type inference via type witness systems">;
|
HelpText<"Enable experimental associated type inference via type witness systems">;
|
||||||
|
|
||||||
|
def enable_experimental_implicit_some :
|
||||||
|
Flag<["-"], "enable-experimental-implicit-some">,
|
||||||
|
HelpText<"Enable experimental implicit some">;
|
||||||
|
|
||||||
def disable_availability_checking : Flag<["-"],
|
def disable_availability_checking : Flag<["-"],
|
||||||
"disable-availability-checking">,
|
"disable-availability-checking">,
|
||||||
HelpText<"Disable checking for potentially unavailable APIs">;
|
HelpText<"Disable checking for potentially unavailable APIs">;
|
||||||
|
|||||||
@@ -3045,6 +3045,10 @@ static bool usesFeatureExistentialAny(Decl *decl) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool usesFeatureImplicitSome(Decl *decl) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
static bool usesFeatureForwardTrailingClosures(Decl *decl) {
|
static bool usesFeatureForwardTrailingClosures(Decl *decl) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -684,9 +684,12 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
|
|||||||
Opts.Features.insert(Feature::ForwardModeDifferentiation);
|
Opts.Features.insert(Feature::ForwardModeDifferentiation);
|
||||||
if (Args.hasArg(OPT_enable_experimental_additive_arithmetic_derivation))
|
if (Args.hasArg(OPT_enable_experimental_additive_arithmetic_derivation))
|
||||||
Opts.Features.insert(Feature::AdditiveArithmeticDerivedConformances);
|
Opts.Features.insert(Feature::AdditiveArithmeticDerivedConformances);
|
||||||
|
|
||||||
if (Args.hasArg(OPT_enable_experimental_opaque_type_erasure))
|
if (Args.hasArg(OPT_enable_experimental_opaque_type_erasure))
|
||||||
Opts.Features.insert(Feature::OpaqueTypeErasure);
|
Opts.Features.insert(Feature::OpaqueTypeErasure);
|
||||||
|
if (Args.hasArg(OPT_enable_experimental_variadic_generics)){
|
||||||
|
Opts.Features.insert(Feature::ImplicitSome);
|
||||||
|
Opts.Features.insert(Feature::ExistentialAny);
|
||||||
|
}
|
||||||
|
|
||||||
Opts.EnableAppExtensionRestrictions |= Args.hasArg(OPT_enable_app_extension);
|
Opts.EnableAppExtensionRestrictions |= Args.hasArg(OPT_enable_app_extension);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user