swift icon indicating copy to clipboard operation
swift copied to clipboard

[SR-291] Crashes compiler in debug, works in release

Open jepers opened this issue 10 years ago • 2 comments

Previous ID SR-291
Radar rdar://23349791
Original Reporter @jepers
Type Bug
Status Closed
Resolution Cannot Reproduce

Environment

OS X 10.11.2, Swift version 2.2-dev (LLVM 3ebdbb2c7e, Clang f66c5bb67b, Swift 69940d166c)

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug
Assignee @jepers
Priority Medium

md5: 99cc90d3bd642dda15875712a5eac12a

Issue Description:

struct S<T> {
    let a: T, b: Int
    init(c: T, d: Int = 2) {
        a = c; b = d
    }
}
let x: S<Int> = .init(c: 1, d: 2) // Compiles fine
let y: S<Int> = S.init(c: 1)      // Compiles fine
let z: S<Int> = .init(c: 1)       // Crashes compiler in debug, works in release

jepers avatar Dec 17 '15 23:12 jepers

Tested this in Swift 3, and it crashes the compiler in both debug and release.

jepers avatar Jun 19 '16 16:06 jepers

Seems to have been fixed. Can't reproduce in Xcode 8 beta 4.

jepers avatar Aug 04 '16 20:08 jepers