Open swift-ci opened 2 years ago
Comment by Ellis Hoag (JIRA)
I believe a workaround is to explicitly set the optional variable to nil
.
{ @Bar var a: Bool? = nil }
@swift-ci create
Apparently, all we did was move the crash from Sema to SILGen. This can be observed by providing wrappedValue
with a dummy get {}
getter to humor Sema.
I had a play and you can work around this bug by making the closure both @autoclosure
and @escaping
.
Additional Detail from JIRA
| | | |------------------|-----------------| |Votes | 0 | |Component/s | | |Labels | Bug | |Assignee | None | |Priority | Medium | md5: c0318b50fadbb361c90032f67b6a66fbIssue Description: Swift crashes when compiling the following source.
Here is the backtrace