Skip to content

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

@swift-ci

Description

@swift-ci
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.

Metadata

Metadata

Assignees

Labels

bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfcrashBug: A crash, i.e., an abnormal termination of softwaretype checkerArea → compiler: Semantic analysis

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions