mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Sema/IDE] Emit same diagnostics for missing switch cases independent of editor mode
This commit is contained in:
@@ -166,6 +166,7 @@ struct ContainsEnum {
|
||||
switch n { // expected-error {{switch must be exhaustive}}
|
||||
// expected-note@-1 {{missing case: '.Mere(_)'}}
|
||||
// expected-note@-2 {{missing case: '.Twain(_, _)'}}
|
||||
// expected-note@-3 {{add missing cases}}
|
||||
case ContainsEnum.Possible<Int>.Naught,
|
||||
ContainsEnum.Possible.Naught, // expected-warning {{case is already handled by previous patterns; consider removing it}}
|
||||
Possible<Int>.Naught, // expected-warning {{case is already handled by previous patterns; consider removing it}}
|
||||
@@ -180,6 +181,7 @@ func nonmemberAccessesMemberType(_ n: ContainsEnum.Possible<Int>) {
|
||||
switch n { // expected-error {{switch must be exhaustive}}
|
||||
// expected-note@-1 {{missing case: '.Mere(_)'}}
|
||||
// expected-note@-2 {{missing case: '.Twain(_, _)'}}
|
||||
// expected-note@-3 {{add missing cases}}
|
||||
case ContainsEnum.Possible<Int>.Naught,
|
||||
.Naught: // expected-warning {{case is already handled by previous patterns; consider removing it}}
|
||||
()
|
||||
|
||||
Reference in New Issue
Block a user