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-14921] Swift Compile Error - Failed to produce diagnostic for expression #57268

Open
swift-ci opened this issue Jul 14, 2021 · 1 comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-14921
Radar None
Original Reporter mtderosier (JIRA User)
Type Bug
Environment

Xcode 12.5

Compile ScrumView.swift (x86_64):

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

md5: e3369e7a6f57efa563d8e703fb37e989

Issue Description:

// Apple Dev Tutorial
// iOS App Developer: Displaying Data in a list
// ScrumView.swift
// Scrumdinger
//
// Created by Michael Derosier on 7/14/21.
//

import SwiftUI

struct ScrumView: View {

let scrums: [DailyScrum]

var body: some View {
List {
ForEach(scrums) {
scrum in CardView(scrum: scrum) .listRowBackground(scrum.color)
}
}
}
}

struct ScrumView_Previews: PreviewProvider {

static var previews: some View {
ScrumView(scrums: DailyScrum.data)
}
}

@typesanitizer
Copy link

Could you please make the example self-contained? Right now, it's missing definitions for multiple types. If I add definitions for those types, I see the code compile fine.

If this is the exact code which gives you the issue, please try verifying with Xcode 13 beta, it should give you proper errors for types not being in scope.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 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
Projects
None yet
Development

No branches or pull requests

2 participants