Details
-
Type:
Bug
-
Status: Resolved
-
Priority:
Medium
-
Resolution: Done
-
Component/s: Compiler
-
Labels:
-
Environment:
5.0-DEVELOPMENT-SNAPSHOT-2019-01-13-a
Apple Swift version 5.0-dev (LLVM ed64f75263, Clang e5012f3421, Swift 5a827a9558)
Target: x86_64-apple-darwin18.2.0
-
Radar URL:
Description
This code crashes the compiler when code coverage is enabled:
struct S {
subscript(i: Int, autoclosure: @autoclosure () -> Int) -> Int {
get {
return 0
}
set {
}
}
}
I am using the latest (5.0-DEVELOPMENT-SNAPSHOT-2019-01-13-a) snapshot.
The SPM project to reproduce the issue: https://github.com/broadwaylamb/CompilerCrasherAutoclosureSubscript
Run:
$ swift build $ swift test --enable-code-coverage
--enable-code-coverage is important.