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-14697] SwiftUI VStack expression failure #57047

Open
swift-ci opened this issue Jun 1, 2021 · 0 comments
Open

[SR-14697] SwiftUI VStack expression failure #57047

swift-ci opened this issue Jun 1, 2021 · 0 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself diagnostics QoI Bug: Diagnostics Quality of Implementation failed to produce diagnostic Bug → internal error: Failed to produce diagnostic for expression SwiftUI Flag: Related to (but not an issue with) SwiftUI type checker Area → compiler: Semantic analysis

Comments

@swift-ci
Copy link
Collaborator

swift-ci commented Jun 1, 2021

Previous ID SR-14697
Radar None
Original Reporter papley (JIRA User)
Type Bug
Environment

XCode 12.5

struct MyItemType: Decodable {

**var** quantity: Int

**var** title: String

**var** description: String

**var** amount_ex_vat: Int

**var** amount_each: Int

**var** sku: String



//    init(dict: \[String:Any\]) {

//

//    }

}

struct JSONView: View {

@State **private** **var** receipts = \["receiptTest2", "receiptTest3", "receiptTest4"\].compactMap { TestJSON(with: $0) }

**var** body: **some** View { // error appears on this line

    **let** json = receipts\[0\].ocrResult

    **let** name = receipts\[0\].previewName



    VStack {

        **if** **let** items = receipts\[0\].lineItems **as**? \[MyItemType\] {

            ScrollView(content: {

                List {

                    ForEach(items, id: .**self**) {

                        item **in** {

                            Text("(item.debugDescription)")

                        }

                    }

                }

            })

        }

    }

}

}

Additional Detail from JIRA
Votes 0
Component/s
Labels Bug
Assignee None
Priority Medium

md5: 718df9416904446cefd32673c24d72c3

Issue Description:

Failed to produce diagnostic for expression; please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the project

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added diagnostics QoI Bug: Diagnostics Quality of Implementation failed to produce diagnostic Bug → internal error: Failed to produce diagnostic for expression SwiftUI Flag: Related to (but not an issue with) SwiftUI compiler The Swift compiler in itself type checker Area → compiler: Semantic analysis labels Dec 22, 2022
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 diagnostics QoI Bug: Diagnostics Quality of Implementation failed to produce diagnostic Bug → internal error: Failed to produce diagnostic for expression SwiftUI Flag: Related to (but not an issue with) SwiftUI type checker Area → compiler: Semantic analysis
Projects
None yet
Development

No branches or pull requests

2 participants