swift
swift copied to clipboard
[SR-291] Crashes compiler in debug, works in release
| 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
Tested this in Swift 3, and it crashes the compiler in both debug and release.
Seems to have been fixed. Can't reproduce in Xcode 8 beta 4.