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-5458] Should not code complete members of 'S.Type' #48030

Closed
belkadan opened this issue Jul 14, 2017 · 3 comments
Closed

[SR-5458] Should not code complete members of 'S.Type' #48030

belkadan opened this issue Jul 14, 2017 · 3 comments
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. code completion Area → source tooling: code completion source tooling Area: IDE support, SourceKit, and other source tooling

Comments

@belkadan
Copy link
Contributor

Previous ID SR-5458
Radar None
Original Reporter @belkadan
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s CodeCompletion
Labels Bug
Assignee @AnthonyLatsis
Priority Medium

md5: 96e72f19482f012c9864d91f06bc795e

cloned from:

  • SR-5453 Trying to define a KeyPath to a static property through a type's Type crashes compiler

Issue Description:

struct S { static let a = 1 }
let kp = \S.Type.a // Invalid code, yes, but `a` comes up as a completion to `S.Type.` so …
dump(kp)
// Xcode 9 beta 3
// Default toolchain: Compiles and crashes at runtime.
// Development Snapshot 2017-07-12: Crashes compiler.

This is a bug from SR-5453, but we shouldn't be providing any completions under S.Type at all.

@belkadan
Copy link
Contributor Author

cc @benlangmuir

@AnthonyLatsis
Copy link
Collaborator

self and Type are the only valid ones though : )

@AnthonyLatsis
Copy link
Collaborator

#16831

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added the source tooling Area: IDE support, SourceKit, and other source tooling label Feb 6, 2023
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. code completion Area → source tooling: code completion source tooling Area: IDE support, SourceKit, and other source tooling
Projects
None yet
Development

No branches or pull requests

2 participants