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-13868] bogus local function called from guard block leads to "failed to produce diagnostic" error #56266

Open
mayoff opened this issue Nov 17, 2020 · 1 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 type checker Area → compiler: Semantic analysis

Comments

@mayoff
Copy link

mayoff commented Nov 17, 2020

Previous ID SR-13868
Radar rdar://problem/71549774
Original Reporter @mayoff
Type Bug
Environment

Xcode 12.3 beta 1

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

md5: de111a449780bf881bf5c1445a4acfa1

Issue Description:

func makePool(x: Any?) -> Any? {
    func reportError() {
        _ = thing
    }


    guard let y = x else {
        reportError()
        return nil
    }


    let thing = y
    return thing
} 



:; xcrun swiftc -version
Apple Swift version 5.3.2 (swiftlang-1200.0.44.1 clang-1200.0.32.28)
Target: x86_64-apple-darwin19.6.0
:; xcrun swiftc -c /tmp/t.swift 
/tmp/t.swift:11:17: error: failed to produce diagnostic for expression; please file a bug report
    let thing = y
                ^
@typesanitizer
Copy link

@swift-ci create

@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 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 type checker Area → compiler: Semantic analysis
Projects
None yet
Development

No branches or pull requests

3 participants