Closed
Description
Previous ID | SR-14894 |
Radar | rdar://80271707 |
Original Reporter | @ahoppen |
Type | Bug |
Status | Resolved |
Resolution | Done |
Additional Detail from JIRA
Votes | 0 |
Component/s | Source Tooling |
Labels | Bug, FoundByStressTester |
Assignee | None |
Priority | Medium |
md5: 19b18351716ffb7dd45615ec21474275
is duplicated by:
- SR-15112 Assertion failed: (!empty()), function back, file SmallVector.h in ConstraintSystem::repairFailures
Issue Description:
The following test case hits an assertion failure !empty()
in ConstraintSystem::repairFailures
.
If a type annotation (icon: Category)
is added to the closure parameter, the crash no longer happens.
// RUN: %sourcekitd-test -req=complete -pos=8:28 %s -- %s -sdk /Applications/Xcode-GPE.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.5.sdk -target arm64-apple-ios13.0
import SwiftUI
struct UserListFormView {
@ViewBuilder var body: some View {
let icons: [Category]
ForEach(icons.map{ $0 }) { icon in
Image(icon)
.sag(icon)
}
}
}
enum Category: String {
case housewares
}
extension View {
func sag<V>(_ tag: V) -> some View where V : Hashable {}
}