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-11503] Regression on self-referential generic where clauses in Swift 5.1 #53904

Open
swift-ci opened this issue Sep 21, 2019 · 4 comments
Open

Comments

@swift-ci
Copy link
Collaborator

@swift-ci swift-ci commented Sep 21, 2019

Previous ID SR-11503
Radar rdar://problem/55625744
Original Reporter andrewchang-bird (JIRA User)
Type Bug
Environment
  • macOS 10.14.6 (18G95)

  • Apple Swift version 5.1 (swiftlang-1100.0.270.13 clang-1100.0.33.7)

  • Xcode 11 (11A420a)

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, 5.1Regression, CompilerCrash, Generics, Serialization
Assignee None
Priority Medium

md5: a10484874437e4d02dc076e577990dae

Issue Description:

In Swift 5.0.1 this declaration compiled successfully:

protocol Type {
  associatedtype Element
}
class GenericType<T: Type> where T.Element == GenericType {}
// also fails: class GenericType<T> where T: Type, T.Element == GenericType {}
// also fails: class GenericType<T> where T: Type, T.Element: GenericType {}

But in Swift 5.1, it now results in an error:

error: Illegal instruction: 4
@theblixguy
Copy link
Collaborator

@theblixguy theblixguy commented Sep 23, 2019

This doesn't crash for me on master and on Xcode 11 GM (I don't have GM2 installed yet, only GM1 aka build 11A419c).

@belkadan
Copy link
Contributor

@belkadan belkadan commented Sep 23, 2019

It crashes in merge-modules, which makes sense given some of the changes in Serialization this release.

@belkadan
Copy link
Contributor

@belkadan belkadan commented Sep 23, 2019

@swift-ci create

@harlanhaskins
Copy link
Collaborator

@harlanhaskins harlanhaskins commented Sep 28, 2019

This is overflowing the stack trying to resolve these decls

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants