You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// This is testing what happens with a CF_ENUM definition that doesn't include
// any enum_extensibility attributes. As such, the test deliberately avoids
// importing anything that might pull in CoreFoundation, even from the mock SDK.
func test(_ value: EnumWithDefaultExhaustivity) {
// We want to assume such enums are non-frozen.
switch value { // expected-error {{switch covers known cases, but 'EnumWithDefaultExhaustivity' may have additional unknown values}} expected-note {{handle unknown values using "@unknown default"}}
case .loneCase: break
}
}
func test(_ value: EnumWithSpecialAttributes) {
// Same, but with the attributes macro shipped in the Xcode 9 SDKs.
switch value { // expected-error {{switch covers known cases, but 'EnumWithSpecialAttributes' may have additional unknown values}} expected-note {{handle unknown values using "@unknown default"}}