[SE-0143] Put conditional conformances behind an "experimental" flag.

Conditional conformances aren't quite ready yet for Swift 4.1, so
introduce the flag `-enable-experimental-conditional-conformances` to
enable conditional conformaces, and an error when one declares a
conditional conformance without specifying the flag.

Add this flag when building the standard library (which will vend
conditional conformances) and to all of the tests that need it.

Fixes rdar://problem/35728337.
This commit is contained in:
Doug Gregor
2017-11-28 16:01:51 -08:00
parent 5af0d814e8
commit b59c30c1af
22 changed files with 68 additions and 25 deletions

View File

@@ -987,7 +987,9 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
Opts.EnableTargetOSChecking
= A->getOption().matches(OPT_enable_target_os_checking);
}
Opts.EnableConditionalConformances |=
Args.hasArg(OPT_enable_experimental_conditional_conformances);
Opts.EnableASTScopeLookup |= Args.hasArg(OPT_enable_astscope_lookup);
Opts.DebugConstraintSolver |= Args.hasArg(OPT_debug_constraints);
Opts.EnableConstraintPropagation |= Args.hasArg(OPT_propagate_constraints);