Skip to content

Aliases from protocols do not function as property wrappers #63400

@JessyCatterwaul

Description

@JessyCatterwaul

In the View file of this project, note that StateObject.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 to ObservedObject.

https://github.com/JessyCatterwaul/Property-Wrapper-Bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.property wrappersFeature: property wrappersprotocolFeature → type declarations: Protocol declarationsswift 5.7type checkerArea → compiler: Semantic analysis

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions