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
SR-4196 Allow #if (conditional compilation) to guard switch cases
Issue Description:
When matching against a case with minimum API requirement, the scope logically inherits the requirement from the case. But the compiler currently does not propagate the requirement, and requires a fallback to dynamic `#available` checks.
importMachOenumLock {
@available(macOS10.12, *)
caseunfairLock(os_unfair_lock_t)
funclock() {
switchself {
caselet .unfairLock(lock):
// Unreachable in macOS version <10.12, but// `#available` is still required here for a green light// from the compiler.os_unfair_lock_lock(lock)
}
}
}
The text was updated successfully, but these errors were encountered:
Environment
Xcode 8.2.1 (8C1002)
Additional Detail from JIRA
md5: de37f303f2707187e9cee8954de0adbf
relates to:
Issue Description:
When matching against a case with minimum API requirement, the scope logically inherits the requirement from the case. But the compiler currently does not propagate the requirement, and requires a fallback to dynamic `#available` checks.
The text was updated successfully, but these errors were encountered: