-
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-16055 |
Radar | rdar://90769544 |
Original Reporter | @ahoppen |
Type | Bug |
Additional Detail from JIRA
Votes | 0 |
Component/s | CodeCompletion |
Labels | Bug, FoundByStressTester |
Assignee | None |
Priority | Medium |
md5: 8ab05b24b2d9e29856ad3b1df3d7b207
Issue Description:
The following new test case only suggests the primaryButton
overload and not the dismissButton
overload because dismissButton
requires an optional conversion and thus has a higher score. Both should be suggested
struct Text {
init(_ x: Int) {}
}
struct Alert {
init(message: Text, dismissButton: Text?) {}
init(message: Text, primaryButton: Text) {}
}
func foo() {
_ = Alert(message: Text(1), #^COMPLETE^#primaryButton: Text(2))
}
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