Open swift-ci opened 5 years ago
Comment by Chris Eidhof (JIRA)
Here's a similar bug, without the private modifier (but using a class):
@propertyWrapper class KeychainItem {
var wrappedValue: String? = nil
}
class Session {
@KeychainItem var sid: String?
}
struct ContentView : View {
let session = Session()
var body: some View {
Text("Hello World")
}
}
If we change Session to be a struct it compiles fine...
The first one's fixed in master and the 5.1 branch. The second one doesn't seem to be crashing for me?
Additional Detail from JIRA
| | | |------------------|-----------------| |Votes | 0 | |Component/s | Compiler | |Labels | Bug, CompilerCrash, PropertyWrappers | |Assignee | None | |Priority | Medium | md5: 8bbcb160b8cab5f0d8c7b0f7cbaffb3dIssue Description:
Here's a minimal example that segfaults:
Removing the private modifier makes the code compile again.
BTW, the diagnostics for the segfault didn't point to this location. It took quite some time to find the culprit.