Open mattyoung opened 2 years ago
Reduced:
struct Data {}
@propertyWrapper
struct Wrapper<T> {
var wrappedValue: T
init(wrappedValue: T) { self.wrappedValue = wrappedValue }
var projectedValue: Self { self }
init(projectedValue: Self) { self = projectedValue }
}
struct S {
init(@Wrapper data: Data) {
_ = data
}
}
The issue here is the wrapped parameter in the initializer; the workaround is to use the wrapper/projection type directly, or use a local property wrapper instead.
This will be fixed by https://github.com/apple/swift/pull/38854
Environment
Xcode Version 13.0 beta 4 (13A5201i)Additional Detail from JIRA
| | | |------------------|-----------------| |Votes | 0 | |Component/s | Compiler | |Labels | Bug | |Assignee | @hborla | |Priority | Medium | md5: ec63ff96d1fef552ade6af181f1d18f8Issue Description:
Create an Xcode SwiftUI iOS app project, create a new SwiftUI view file HierarchyList.swift, paste the following and then preview to see Abort: trap 6 or run to see many more errors in Xcode
See https://forums.swift.org/t/xcode-abort-trap-6-and-non-sensical-compile-error-maybe-related-to-se-0293/50907