-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Closed
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itself
Description
Previous ID | SR-13361 |
Radar | rdar://problem/67361244 |
Original Reporter | Trahambb (JIRA User) |
Type | Bug |
Status | Resolved |
Resolution | Done |
Additional Detail from JIRA
Votes | 0 |
Component/s | Compiler |
Labels | Bug |
Assignee | @beccadax |
Priority | Medium |
md5: 6b8e7a5186e17177ccbd1f5290a2dd29
Issue Description:
When i try to use if #available(iOS 14, *) in Xcode 12 beta 4 to separate code for iOS 14 and lower i got a crash when building on iOS 13 device:
Thread 1: EXC_BAD_ACCESS (code=1, address=0x0)
Example:
struct ContentView: View {
var body: some View {
if #available(iOS 14.0, *) {
List {
Text("iOS 14")
}
.listStyle(InsetGroupedListStyle())
} else {
List {
Text("iOS 13")
}
.listStyle(GroupedListStyle())
.environment(\.horizontalSizeClass, .regular)
}
}
}
Metadata
Metadata
Assignees
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itself