blob: 686e8a9c4b1d3ec22306a580447c0d36cf2e50d5 [file] [log] [blame]
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -verify -I %S/Inputs/custom-modules -enable-nonfrozen-enum-exhaustivity-diagnostics %s
// REQUIRES: objc_interop
import Foundation
import AvailabilityExtras
func exhaustiveSwitch(e: NSEnumAddedCasesIn2017) {
switch e { // expected-error{{switch must be exhaustive}}
// expected-note@-1{{add missing case: '.newCaseOne'}}
// expected-note@-2{{handle unknown values using "@unknown default"}}
case .existingCaseOne:
return
case .existingCaseTwo:
return
case .existingCaseThree:
return
}
}