mirror of
https://github.com/apple/swift.git
synced 2026-10-26 20:15:53 +01:00
Rather than emitting a note for each case, just emit a single note for all the cases, with each case printed in the message, up to a column limit. `@unknown case` still gets its own note since it includes some useful explanation. rdar://143342616
9 lines
333 B
Swift
9 lines
333 B
Swift
// RUN: %target-typecheck-verify-swift %s %S/Inputs/fixits-enum-multifile.swift -I %S/Inputs
|
|
|
|
func foo1(_ e: EMulti) {
|
|
switch e {
|
|
// expected-error@-1 {{switch must be exhaustive}}
|
|
// expected-note@-2 {{add missing cases: '.e1', '.e2', '.e3(_)'}} {{+3:3-3=case .e1:\n<#code#>\ncase .e2:\n<#code#>\ncase .e3(_):\n<#code#>\n}}
|
|
}
|
|
}
|