Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-15112] Assertion failed: (!empty()), function back, file SmallVector.h in ConstraintSystem::repairFailures #57438

Closed
ahoppen opened this issue Aug 25, 2021 · 1 comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself found by stress tester Flag: An issue found by the SourceKit stress tester

Comments

@ahoppen
Copy link
Contributor

ahoppen commented Aug 25, 2021

Previous ID SR-15112
Radar rdar://82330068
Original Reporter @ahoppen
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, FoundByStressTester
Assignee None
Priority Medium

md5: e01c47c63821b55ea3e29a809d47c59c

duplicates:

  • SR-14894 Assertion failed: (!empty()) in ConstraintSystem::repairFailures

Issue Description:

Typechecking the following file results in an assertion failure Assertion failed: (!empty()), function back, file SmallVector.h, line 264. inside ConstraintSystem::repairFailures

struct CalendarView {
    private let months: [[String]] = [["jan.", "feb.", "mar.", "apr."]]
    private func makeMonthPill() {}
    
    func foo() {
        GorEach(months) { group in
            GorEach(group) { month in
                self.makeMonthPill()
            }
        }
    }
}

struct Binding<T> {}

protocol View2 {}

@resultBuilder struct ViewBuilder2 {
  static func buildBlock<Content>(_ content: Content) -> Content where Content : View2 { fatalError() }
}

struct GorEach<Data, Content> where Data : RandomAccessCollection {
    init<C>(_ data: Binding<C>, @ViewBuilder2 content: (Binding<C.Element>) -> Content) where C : MutableCollection {}
    init(_ data: Data, @ViewBuilder2 content: @escaping (Data.Element) -> Content) {}
}
@ahoppen
Copy link
Contributor Author

ahoppen commented Aug 25, 2021

Possibly caused by #38082

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself found by stress tester Flag: An issue found by the SourceKit stress tester
Projects
None yet
Development

No branches or pull requests

1 participant