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-12543] Segfault if use Self.typealias from protocol #54987

Open
swift-ci opened this issue Apr 7, 2020 · 2 comments
Open

[SR-12543] Segfault if use Self.typealias from protocol #54987

swift-ci opened this issue Apr 7, 2020 · 2 comments
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 type checker Area → compiler: Semantic analysis

Comments

@swift-ci
Copy link
Collaborator

swift-ci commented Apr 7, 2020

Previous ID SR-12543
Radar rdar://problem/61911121
Original Reporter qRoC (JIRA User)
Type Bug
Environment

1) xCode 11.4

2) Apple Swift version 5.2-dev (LLVM 26ec4a6, Swift 6adc3e6)
Target: x86_64-apple-darwin19.4.0

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

md5: a076d8b7d5ca78f591ac14bbed48fd80

Issue Description:

protocol P {
    associatedtype AT
    typealias T = UnsafePointer<AT>

    var a: T { get }
}
public struct S<AT>: P {
    // var a: Self.T // ok
    var a: Self.T { fatalError() }
    let b: UnsafePointer<T>
}

Result:
Assertion failed: (GenericSig && "Dependent type in pattern without generic signature?"), function requiresClass, file /Users/buildnode/jenkins/workspace/oss-swift-package-osx/swift/lib/SIL/AbstractionPattern.cpp, line 231.

@weissi
Copy link
Member

weissi commented Apr 13, 2020

@swift-ci create

@swift-ci
Copy link
Collaborator Author

swift-ci commented Jul 8, 2020

Comment by Helge Heß (JIRA)

Not sure it's the same thing, but I get the same crash in my new project with Linux Swift 5.2/5.1.

swift: /home/buildnode/jenkins/workspace/oss-swift-5.2-package-linux-ubuntu-18_04/swift/lib/SIL/AbstractionPattern.cpp:224: bool swift::Lowering::AbstractionPattern::requiresClass() const: Assertion `GenericSig && "Dependent type in pattern without generic signature?"' failed. 

It is fixed in the 5.3 nightly Docker, but I'm trying to figure out whether I could workaround it.

@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
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 type checker Area → compiler: Semantic analysis
Projects
None yet
Development

No branches or pull requests

3 participants