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-14549] Function call gives an error "Type of expression is ambiguous without more context". #56901

swift-ci opened this issue Apr 29, 2021 · 2 comments


Copy link

@swift-ci swift-ci commented Apr 29, 2021

Previous ID SR-14549
Radar rdar://problem/77325083
Original Reporter Łukasz (JIRA User)
Type Bug
Status Resolved
Resolution Duplicate

Swift 5

Xcode Version 12.5 (12E262)

MacOS BigSur 11.3,

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, DiagnosticsQoI, TypeChecker
Assignee None
Priority Medium

md5: 55307744ad03437b2338a3eca460a66f


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

Issue Description:

When parameter is a PartialKeyPath, and I pass in a keypath literal to the function compiler gives an error "Type of expression is ambiguous without more context"

func getSomethingFor(path: PartialKeyPath<Int>) {}

getSomethingFor(path: .magnitude) // Type of expression is ambiguous without more context

Copy link

@typesanitizer typesanitizer commented Apr 29, 2021

Reproduces off main @ c9b880d.

@swift-ci create

Copy link

@LucianoPAlmeida LucianoPAlmeida commented Apr 30, 2021

Is duplicated from SR-5667

@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
None yet

No branches or pull requests

3 participants