mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Enable @unknown default warnings by default in Swift 5 mode (#16045)
Note that I said "warnings"; we're going to be more cautious about rollout and just make this a warning in Swift 5 mode, with /no/ diagnostics in Swift 3 and 4. Users are still free to use `@unknown default` in these modes, and they'll get a fatal run-time error if they don't and an unexpected case actually shows up. rdar://problem/29324688
This commit is contained in:
@@ -312,7 +312,7 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
|
||||
Opts.EnableNonFrozenEnumExhaustivityDiagnostics =
|
||||
Args.hasFlag(OPT_enable_nonfrozen_enum_exhaustivity_diagnostics,
|
||||
OPT_disable_nonfrozen_enum_exhaustivity_diagnostics,
|
||||
Opts.EnableNonFrozenEnumExhaustivityDiagnostics);
|
||||
Opts.isSwiftVersionAtLeast(5));
|
||||
|
||||
if (Arg *A = Args.getLastArg(OPT_Rpass_EQ))
|
||||
Opts.OptimizationRemarkPassedPattern =
|
||||
|
||||
Reference in New Issue
Block a user