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-12072] Compiler crashes when protocols have associated types with lower bounds #54508
Comments
Stack trace on master:
|
Slightly smaller reproducer: class C {}
protocol Foo {
associatedtype X where C: X
} This looks like a regression because we used to correctly diagnose this in Swift 5, but since 5.1 this is crashing. |
Another reproducer: class C {}
protocol Foo {
associatedtype W
associatedtype X where Foo: W
} |
@swift-ci create |
Calling FloatingRequirementSource::getSource on a bogus type is going to crash as expected. We need to throw an ErrorType somewhere. |
@swift-ci create |
Yeah. I also think we have a strange diagnostic (=<Swift 5), for example |
I think I have a 3-line patch that'll fix this. I'll tag you as a reviewer when I get a radar number to associate it with. |
Okay, sync isn't listening to me. rdar://58941114 has been filed. We'll dupe when/if it wakes up. |
Merged to master #29491 |
Environment
Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
Target: x86_64-apple-darwin18.7.0
Additional Detail from JIRA
md5: d2311401b679cc6e44d3366d1b6415f3
Issue Description:
The following code makes the compiler crash.
The text was updated successfully, but these errors were encountered: