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-14382] Quick help shows incorrect type for dynamicMemberLookup property #60698

Open
xAlien95 opened this issue Mar 21, 2021 · 1 comment
Open

Comments

@xAlien95
Copy link
Contributor

Previous ID SR-14382
Radar rdar://problem/75697518
Original Reporter @xAlien95
Type Bug

Attachment: Download

Environment

Xcode 12.4 (12D4e)
Swift Development Snapshot 2021-03-20

Additional Detail from JIRA
Votes 0
Component/s SourceKit-LSP
Labels Bug
Assignee None
Priority Medium

md5: 8d53c1f81757b529593d97863e6c9773

Issue Description:

Consider the following snippet:

struct S {
  let foo: Int
}

@dynamicMemberLookup
struct W {
  subscript(dynamicMember keyPath: KeyPath<S, Int>) -> String {
    "Swift"
  }
}

// overviewed as "let foo: Int" (see attachment)
// suggested as "foo: String"
_ = W().foo

The underlying type is correct.

@typesanitizer
Copy link

@swift-ci create

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 9, 2022
@ahoppen ahoppen removed the bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. label Aug 22, 2022
@ahoppen ahoppen transferred this issue from apple/sourcekit-lsp Aug 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants