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-14431] Global completions at top level from module only appear after import statement #56787

Closed
ahoppen opened this issue Mar 31, 2021 · 1 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

Comments

@ahoppen
Copy link
Contributor

ahoppen commented Mar 31, 2021

Previous ID SR-14431
Radar rdar://problem/76053908
Original Reporter @ahoppen
Type Bug
Status Closed
Resolution Duplicate
Additional Detail from JIRA
Votes 0
Component/s CodeCompletion
Labels Bug
Assignee None
Priority Medium

md5: c36ce2769619e83e1584959b0dd6ed33

duplicates:

  • SR-8898 CodeCompletion: Forward references do not show up in top-level module scope

Issue Description:

_ = NSString()
import Foundation

Is valid Swift code but we’re not suggesting NSString because the import happens after the use of NSString.

The following variations work:

import Foundation
_ = NSString()
func foo() {
  _ = NSString() 
}

import Foundation
@ahoppen
Copy link
Contributor Author

ahoppen commented Mar 31, 2021

@swift-ci Create

@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