[NCGenerics] enable new associated type inference

The experimental-associated-type-inference flag is needed to correctly
build programs when NoncopyableGenerics is enabled.
This commit is contained in:
Kavon Farvardin
2024-01-12 18:31:06 -08:00
parent 9606f523c1
commit fc9575cda9
2 changed files with 4 additions and 1 deletions

View File

@@ -895,8 +895,10 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
Opts.enableFeature(Feature::LayoutPrespecialization);
if (SWIFT_ENABLE_EXPERIMENTAL_NONCOPYABLE_GENERICS)
if (SWIFT_ENABLE_EXPERIMENTAL_NONCOPYABLE_GENERICS) {
Opts.enableFeature(Feature::NoncopyableGenerics);
Opts.EnableExperimentalAssociatedTypeInference = true;
}
Opts.EnableAppExtensionLibraryRestrictions |= Args.hasArg(OPT_enable_app_extension_library);
Opts.EnableAppExtensionRestrictions |= Args.hasArg(OPT_enable_app_extension);

View File

@@ -609,6 +609,7 @@ function(_compile_swift_files
if(SWIFT_ENABLE_EXPERIMENTAL_NONCOPYABLE_GENERICS)
list(APPEND swift_flags "-enable-experimental-feature" "NoncopyableGenerics")
list(APPEND swift_flags "-Xfrontend" "-enable-experimental-associated-type-inference")
list(APPEND swift_flags "-Xfrontend" "-disable-round-trip-debug-types") # NOTE: temporary until we fix mangling!
endif()