Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aliases from protocols do not function as property wrappers #63400

Open
JessyCatterwaul opened this issue Feb 2, 2023 · 0 comments
Open

Aliases from protocols do not function as property wrappers #63400

JessyCatterwaul opened this issue Feb 2, 2023 · 0 comments
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

Comments

@JessyCatterwaul
Copy link

JessyCatterwaul commented Feb 2, 2023

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

@JessyCatterwaul JessyCatterwaul added bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. triage needed This issue needs more specific labels labels Feb 2, 2023
@LucianoPAlmeida LucianoPAlmeida added type checker Area → compiler: Semantic analysis property wrappers Feature: property wrappers swift 5.7 protocol Feature → type declarations: Protocol declarations and removed triage needed This issue needs more specific labels labels Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

2 participants