Skip to content

[SR-3942] Crasher with extension and default values #46527

@hartbit

Description

@hartbit
Previous ID SR-3942
Radar rdar://problem/28997795
Original Reporter @hartbit
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, CompilerCrash, SILGen
Assignee @slavapestov
Priority Medium

md5: 5c280e60f6ad3a3f318fa16d68a2ee3e

Issue Description:

The following script crashes the compiler in 3.0.2 and latest 3.1:

{ echo 'struct A { let a: String = "" }' > a.swift; echo 'extension A { init(b: String) {} }' > b.swift; swiftc a.swift b.swift }

Perhaps related, a very similar piece of code hangs indefinitely in 3.0.2:

{ echo 'enum A { case a }; struct B { var a: A = .a }' > a.swift; echo 'extension B { init(b: String) {} }' > b.swift; swiftc a.swift b.swift }

Metadata

Metadata

Assignees

Labels

SILGenArea → compiler: The SIL generation stagebugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfcrashBug: A crash, i.e., an abnormal termination of software

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions