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-4845] Irrelevant elements when autocompleting enum cases #47422

Open
NachoSoto opened this issue May 9, 2017 · 6 comments
Open

[SR-4845] Irrelevant elements when autocompleting enum cases #47422

NachoSoto opened this issue May 9, 2017 · 6 comments
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. code completion Area → source tooling: code completion compiler The Swift compiler itself source tooling Area: IDE support, SourceKit, and other source tooling type checker Area → compiler: Semantic analysis

Comments

@NachoSoto
Copy link
Contributor

Previous ID SR-4845
Radar None
Original Reporter @NachoSoto
Type Bug

Attachment: Download

Environment

Swift version 3.1 (swiftlang-802.0.53 clang-802.0.42)
Swift version 4.0.2 (swiftlang-900.0.69.1 clang-900.0.38)

Additional Detail from JIRA
Votes 0
Component/s CodeCompletion, Compiler
Labels Bug, TypeChecker
Assignee @nkcsgexi
Priority Medium

md5: 3f5617c817e3a5ad98b2f2fe12db4c38

Issue Description:

Write the following code on Xcode:

enum E {
    case a
    case b
    case c
}

struct S {
    let e: E = .a
}

var s = S()
s.e = .

Expected results:

Only a, b, and c are displayed.

Actual result:

@NachoSoto
Copy link
Contributor Author

This is not a regression btw, I've seen this for as long as I can remember, I just never bothered to file it...

@NachoSoto
Copy link
Contributor Author

This seems fixed in Swift 4.0. Given that this bug wasn't screened though I wonder if there are regression tests for this though?

@slavapestov
Copy link
Contributor

@nkcsgexi Can you check if there's a regression test and add one if there isn't?

@NachoSoto
Copy link
Contributor Author

This is broken again

@nkcsgexi
Copy link
Contributor

nkcsgexi commented Nov 2, 2017

@slavapestov We do have test on this case: https://github.com/apple/swift/blob/master/test/IDE/complete_enum_elements.swift

Could you attach the source file for reproducing? I cannot reproduce locally with a toy example.

@AnthonyLatsis
Copy link
Collaborator

@NachoSoto Can you verify whether the issue is still present in the latest Xcode release? We do indeed have quite some test cases for this in the file mentioned by Xi

@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
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 compiler The Swift compiler itself source tooling Area: IDE support, SourceKit, and other source tooling type checker Area → compiler: Semantic analysis
Projects
None yet
Development

No branches or pull requests

4 participants