Skip to content

[SR-11636] Accessing covariant Self from stored property initializer in extension segfaults #54047

@DeFrenZ

Description

@DeFrenZ
Previous ID SR-11636
Radar rdar://problem/56467142
Original Reporter @DeFrenZ
Type Bug
Status Resolved
Resolution Done
Environment

Xcode 11.1 (11A1027)

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, CompilerCrash, StarterBug
Assignee @CodaFi
Priority Medium

md5: 95fa6dd3261c88c421192579e14d986d

is duplicated by:

  • SR-11689 Segmentation fault referring to Self in class extension

Issue Description:

This crashes the compiler

class Foo {}
extension Foo {
    static let foo = "\(Self.self)"
}

Doing the same but without the extension gives the correct (I believe) error

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 softwaregood first issueGood for newcomers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions