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-13656] Quick Help does not work for closure parameters #56094

Closed
pwightman opened this issue Oct 5, 2020 · 2 comments
Closed

[SR-13656] Quick Help does not work for closure parameters #56094

pwightman opened this issue Oct 5, 2020 · 2 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.

Comments

@pwightman
Copy link

Previous ID SR-13656
Radar rdar://problem/69979000
Original Reporter @pwightman
Type Bug
Status Closed
Resolution Invalid

Attachment: Download

Additional Detail from JIRA
Votes 0
Component/s Source Tooling
Labels Bug
Assignee None
Priority Medium

md5: 4a13d4044e7b729d5ac80603e66587ad

Issue Description:

Quick Help in Xcode does not show type information for closure params, but does for usages of the param within the closure body.

Affected Xcode versions: This has been the case since Swift was released AFAIK, I never remember it working, but definitely Xcode 10, 11 & 12.

Example:

let _: (Int) -> Void = { num in // <- option-clicking 'num' here does not show type info
    print(num) // <- option-clicking here does show type info
}

Option-clicking closure params is something I want to do very often, as a means of exploring types of unfamiliar APIs, or to know which order the params come in, e.g. "does [1, 2, 3].enumerated() return (index, num) or (num, index)?"

Workarounds include: using the parameter in the function body and option-clicking, or manually looking up the documentation for the function.

Screenshots:

``

``

@typesanitizer
Copy link

@swift-ci create

@akyrtzi
Copy link
Member

akyrtzi commented Oct 7, 2020

Thanks for reporting this but this is an Xcode-side issue, not Swift tooling one. It would not be fixed with a change in the Swift repository, so a Swift Jira issue is not applicable.

I'd recommend to file a bug report at https://feedbackassistant.apple.com so you can follow when an Xcode release has this fixed.

@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.
Projects
None yet
Development

No branches or pull requests

3 participants