-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.code completionArea → source tooling: code completionArea → source tooling: code completionfound by stress testerFlag: An issue found by the SourceKit stress testerFlag: An issue found by the SourceKit stress testersource toolingArea: IDE support, SourceKit, and other source toolingArea: IDE support, SourceKit, and other source tooling
Description
Previous ID | SR-14547 |
Radar | rdar://problem/77263334 |
Original Reporter | @ahoppen |
Type | Bug |
Status | Resolved |
Resolution | Done |
Additional Detail from JIRA
Votes | 0 |
Component/s | CodeCompletion |
Labels | Bug, FoundByStressTester |
Assignee | @ahoppen |
Priority | Medium |
md5: cbd6b69c0813e5e16d6650fffff54986
Issue Description:
Consider the following new test case:
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=COMPLETE | %FileCheck %s
import Foundation
enum SomeError: Error {
case validateStringIsNotUTF8(String)
func foo() {
switch self {
case .#^COMPLETE^#validateStringIsNotUTF8(let value):
break
}
}
}
// CHECK: Begin completions
// CHECK-DAG: Decl[EnumElement]/ExprSpecific/TypeRelation[Identical]: validateStringIsNotUTF8({#String#})[#SomeError#];
// CHECK: End completions
When completing on COMPLETE
, we are suggesting
Begin completions, 2 items
Decl[AssociatedType]/CurrNominal/IsSystem: RawValue; name=RawValue
Decl[Constructor]/CurrNominal/IsSystem: init({#rawValue: FixedWidthInteger#})[#(_ErrorCodeProtocol & RawRepresentable)?#]; name=init(rawValue: FixedWidthInteger)
End completions
but not validateStringIsNotUTF8
.
When import Foundation
is removed, validateStringIsNotUTF8
is correctly suggested and the two results mentioned above no longer show up.
Metadata
Metadata
Assignees
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.code completionArea → source tooling: code completionArea → source tooling: code completionfound by stress testerFlag: An issue found by the SourceKit stress testerFlag: An issue found by the SourceKit stress testersource toolingArea: IDE support, SourceKit, and other source toolingArea: IDE support, SourceKit, and other source tooling