swift
swift copied to clipboard
[SR-289] Compiler crashed by ignored subscript label
| Previous ID | SR-289 |
| Radar | rdar://23504813 |
| 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: ec229c66ce99547049a8f6f97a399f59
Issue Description:
protocol P {
subscript(i: Int) -> Int { get set }
}
struct S : P {
subscript(_: Int) -> Int { // <-- The "_" crashes compiler, eg "index" won't crash the compiler.
get { return 1 }
set { }
}
}
(Note the unrelated bonus compiler crasher in the linked radar.)
Seems to have been fixed in Swift 3.
Seems to have been fixed. Can't reproduce in Xcode 8 beta 4.