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-14818] Failed to produce diagnostic (SwiftUI) #57166

Open
odmir opened this issue Jun 23, 2021 · 3 comments
Open

[SR-14818] Failed to produce diagnostic (SwiftUI) #57166

odmir opened this issue Jun 23, 2021 · 3 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

@odmir
Copy link

odmir commented Jun 23, 2021

Previous ID SR-14818
Radar rdar://problem/79671444
Original Reporter @odmir
Type Bug
Environment

macOS Monterey 12.0 Beta (21A5248p)

Xcode 13.0 beta (13A5154h)

Tested toolchains:

  • Default Xcode 13.0 Swift Toolchain and

  • Swift 5.5 Development Snapshot 2021-06-14 (a)

  • Swift 5.5 Development Snapshot 2021-06-23 (a)

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

md5: 3d42c213239f970ba768878df8a26fc3

Issue Description:

import SwiftUI

struct ContentView: View {
    var body: some View {
        Text("Example")
            .badge
    }
}

This snippet produces a "Failed to produce diagnostic for expression..." error. This example was reduced from the WWDC 21 Code-Along "SwiftUI on the Mac:*" series.

I've also tested with the latest development toolchain available (Swift 5.5 Development Snapshot 2021-06-14 (a)).

@typesanitizer
Copy link

@swift-ci create

@typesanitizer
Copy link

Are you saying the code in the code-along doesn't compile (and this is a reduced version of it)? Or is it that you made a change and it stopped compiling (and then you reduced it)?

@odmir
Copy link
Author

odmir commented Jun 23, 2021

I was following the code-along and noticed it failed while typing the .badge modifier (didn't finish writing the whole thing). Then I stripped everything that didn't affect the result and that is the reduced example posted here.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added failed to produce diagnostic Bug → internal error: Failed to produce diagnostic for expression SwiftUI Flag: Related to (but not an issue with) SwiftUI 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

3 participants