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-8998] Compiler crash related to associated types #51501

Closed
jepers opened this issue Oct 15, 2018 · 2 comments
Closed

[SR-8998] Compiler crash related to associated types #51501

jepers opened this issue Oct 15, 2018 · 2 comments
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself crash Bug: A crash, i.e., an abnormal termination of software

Comments

@jepers
Copy link

jepers commented Oct 15, 2018

Previous ID SR-8998
Radar None
Original Reporter @jepers
Type Bug
Status Closed
Resolution Done
Environment

Xcode 10, default toolchain

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, CompilerCrash
Assignee @slavapestov
Priority Medium

md5: 61b4dede7a0cba303de0efee640af6fd

Issue Description:

This program crashes the compiler:

protocol P {
    associatedtype A: Q where A.B == Self
}

protocol Q {
    associatedtype B: P where B.A == Self
}

struct S1<T>: P where T: Q { }

struct S2: Q {
    typealias B = S1<S2>
}

Related forum thread:
https://forums.swift.org/t/self-referencing-associated-type/16727

@belkadan
Copy link
Contributor

cc @slavapestov

@slavapestov
Copy link
Member

Doesn't crash on master. I'll add a regression test.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added the crash Bug: A crash, i.e., an abnormal termination of software label Dec 12, 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 crash Bug: A crash, i.e., an abnormal termination of software
Projects
None yet
Development

No branches or pull requests

4 participants