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-11392] Failed to produce diagnostic when using protocol conforming with extension #53793

Closed
kateinoigakukun opened this issue Aug 29, 2019 · 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 type checker Area → compiler: Semantic analysis

Comments

@kateinoigakukun
Copy link
Member

Previous ID SR-11392
Radar rdar://problem/54839571
Original Reporter @kateinoigakukun
Type Bug
Status Resolved
Resolution Done
Environment

Swift version 5.1-dev (LLVM c5340df2d1, Swift 84f625f)
Target: x86_64-unknown-linux-gnu

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

md5: ca664a5aaaec260a347e8a088858fa02

Issue Description:

protocol P1 {
    associatedtype X
    associatedtype A: P2 where A.X == X
}

protocol P2 {
    associatedtype X
}

struct S {}

extension S {
    struct A: P2 {
        typealias X = Int
    }
}


extension S: P1 {}

print(S.X.self)

This results

 error: failed to produce diagnostic for expression; please file a bug report
@belkadan
Copy link
Contributor

@swift-ci create

@CodaFi
Copy link
Member

CodaFi commented Oct 21, 2019

Godbolt sez 4.2 was the last time we gave a diagnostic here

source>:21:9: error: reference to invalid associated type 'X' of type 'S'
print(S.X.self)
        ^
<source>:19:1: error: type 'S' does not conform to protocol 'P1'
extension S: P1 {}
^
<source>:2:20: note: protocol requires nested type 'X'; do you want to add it?
    associatedtype X
                   ^

@slavapestov
Copy link
Member

#28157

@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 diagnostics QoI Bug: Diagnostics Quality of Implementation labels Dec 22, 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 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

5 participants