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

[SR-8382] Contextual typing for key path literals in PartialKeyPath<T> context doesn't work. #50909

Closed
rudkx opened this issue Jul 26, 2018 · 3 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)

Comments

@rudkx
Copy link
Member

rudkx commented Jul 26, 2018

Previous ID SR-8382
Radar rdar://problem/32365183
Original Reporter @rudkx
Type Bug
Status Resolved
Resolution Duplicate
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, KeyPaths
Assignee None
Priority Medium

md5: 4c65f0903769328324566d5cd186b646

duplicates:

  • SR-5667 Type inference for Swift 4 KeyPaths fails within collections

Issue Description:

struct S { var i: Int = 0 }
enum E { case A(pkp: PartialKeyPath<S>) }
_ = E.A(pkp: \.i)

results in:

error: expression type 'E' is ambiguous without more context

@rudkx
Copy link
Member Author

rudkx commented Jul 26, 2018

@mdiep, is this something you might be interested in looking into?

@mdiep
Copy link
Contributor

mdiep commented Jul 26, 2018

Yes, it is. I started looking into it this morning. There are a few of these open: SR-8335, SR-5578, and probably others.

@rudkx
Copy link
Member Author

rudkx commented Jul 26, 2018

Great. Feel free to assign anything you're interested in looking at to yourself, especially if you start actively looking at it. You can always move it back to Unassigned if you decide to move on to something different.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
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)
Projects
None yet
Development

No branches or pull requests

2 participants