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-4059] Compiler Crash on Subclasses Further Constraining Generics Initializer #46642

Closed
swift-ci opened this issue Feb 24, 2017 · 6 comments
Closed

Comments

@swift-ci
Copy link
Collaborator

@swift-ci swift-ci commented Feb 24, 2017

Previous ID SR-4059
Radar None
Original Reporter Logan (JIRA User)
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, 3.1Regression, CompilerCrash
Assignee None
Priority Medium

md5: 918fe3645f29300276cb0a409197574f

Issue Description:

Not sure if that title is the ticket, but here's repro. Runs and builds fine on 3.0.2, crash seg fault on 3.1:

    class Base {
        init<S: Sequence>(_ s: S) where S.Iterator.Element == UInt8 {

        }
    }

    class Sub: Base {
        init(_ b: [UInt8]) {
            super.init(b)
        }
    }
@belkadan
Copy link
Contributor

@belkadan belkadan commented Feb 24, 2017

Looks like this is fixed on master but still fails on the 3.1 branch. @huonw, any insights? Is there something small enough to pull in?

@huonw
Copy link
Mannequin

@huonw huonw mannequin commented Feb 24, 2017

I don't think anything I've done would've touched this. I recall @DougGregor doing something with where-clauses on methods a while ago, but I also recall that the situation there was possibly a little different. In summary, no insights.

@DougGregor
Copy link
Member

@DougGregor DougGregor commented Feb 27, 2017

Swift 3.1 is apparently considering this initializer to be an override, then crashes later in SILGen. Master correctly doesn't consider it to be an override.

@DougGregor
Copy link
Member

@DougGregor DougGregor commented Feb 27, 2017

GitHub master: #7788

Porting this to Swift 3.1 fixes the crasher there, which I'll do as soon as that PR merges.

@DougGregor
Copy link
Member

@DougGregor DougGregor commented Feb 27, 2017

3.1 PR: #7792

@DougGregor
Copy link
Member

@DougGregor DougGregor commented Feb 28, 2017

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
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

3 participants