swift icon indicating copy to clipboard operation
swift copied to clipboard

[SR-289] Compiler crashed by ignored subscript label

Open jepers opened this issue 10 years ago • 2 comments

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.)

jepers avatar Dec 17 '15 23:12 jepers

Seems to have been fixed in Swift 3.

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 21:08 jepers