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-14572] Associated types not suggested on generic type if in an equals constraint of a type signature #56924

Closed
ahoppen opened this issue May 3, 2021 · 2 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. code completion Area → source tooling: code completion found by stress tester Flag: An issue found by the SourceKit stress tester source tooling Area: IDE support, SourceKit, and other source tooling

Comments

@ahoppen
Copy link
Contributor

ahoppen commented May 3, 2021

Previous ID SR-14572
Radar rdar://problem/77458518
Original Reporter @ahoppen
Type Bug
Additional Detail from JIRA
Votes 0
Component/s CodeCompletion
Labels Bug, FoundByStressTester
Assignee None
Priority Medium

md5: 466b15c67f2ca68e4bc27d9aead4c216

Issue Description:

In the new test case below we are not suggesting .Value on K. When removing the == Foo constraint or changing it to : MyProtocol, then .Value is correctly suggested.

// RUN: %swift-ide-test --code-completion -source-filename %s -code-completion-token=COMPLETE | %FileCheck %s

struct Foo {}

protocol MyProtocol {
    associatedtype Value
}

func foo<K: MyProtocol>(_ key: K.Type) where K.#^COMPLETE^#Value == Foo {
}

// CHECK: Begin completions, 2 items
// CHECK: Decl[AssociatedType]/CurrNominal:   Value;
// CHECK: Keyword/None:                       Type[#K.Type#];
// CHECK: End completions
@ahoppen
Copy link
Contributor Author

ahoppen commented May 3, 2021

@swift-ci Create

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@ahoppen
Copy link
Contributor Author

ahoppen commented May 5, 2022

Fixed by #58614

@ahoppen ahoppen closed this as completed May 5, 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 found by stress tester Flag: An issue found by the SourceKit stress tester source tooling Area: IDE support, SourceKit, and other source tooling
Projects
None yet
Development

No branches or pull requests

2 participants