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

Key paths with opaque types cannot be directly initialized. #64341

Open
JessyCatterwaul opened this issue Mar 14, 2023 · 0 comments
Open

Key paths with opaque types cannot be directly initialized. #64341

JessyCatterwaul opened this issue Mar 14, 2023 · 0 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself key paths Feature: key paths (both native and Objective-C) opaque types Feature → types: opaque types swift 5.9 type checker Area → compiler: Semantic analysis type inference Feature: type inference unexpected error Bug: Unexpected error

Comments

@JessyCatterwaul
Copy link

struct T {
  let property: Never
}

let keyPath = \T.property
let compiles: PartialKeyPath<some Any> = keyPath
let doesNotCompile: PartialKeyPath<some Any> = \T.property
@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 Mar 14, 2023
@AnthonyLatsis AnthonyLatsis added compiler The Swift compiler in itself key paths Feature: key paths (both native and Objective-C) opaque types Feature → types: opaque types swift 5.9 unexpected error Bug: Unexpected error type checker Area → compiler: Semantic analysis type inference Feature: type inference and removed triage needed This issue needs more specific labels labels Mar 14, 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. compiler The Swift compiler in itself key paths Feature: key paths (both native and Objective-C) opaque types Feature → types: opaque types swift 5.9 type checker Area → compiler: Semantic analysis type inference Feature: type inference unexpected error Bug: Unexpected error
Projects
None yet
Development

No branches or pull requests

2 participants