Aliases from protocols do not function as property wrappers #63400
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
property wrappers
Feature: property wrappers
protocol
Feature → type declarations: Protocol declarations
swift 5.7
type checker
Area → compiler: Semantic analysis
In the
View
file of this project, note thatStateObject.Collection
, which is a type alias defined in a protocol, can be instantiated via(wrappedValue: …
. But it cannot be used as a property wrapper.Also note that
ObservedObject.Collection
can be used as a property wrapper. The difference is that this latter example is defined in an extension toObservedObject
.https://github.com/JessyCatterwaul/Property-Wrapper-Bug
The text was updated successfully, but these errors were encountered: