swiftlang / swift

The Swift Programming Language
https://swift.org
Apache License 2.0
67.66k stars 10.38k forks source link

[SR-7781] If a method exactly matches a protocol requirement, ignore any near matches the method might have #50320

Open Dante-Broggi opened 6 years ago

Dante-Broggi commented 6 years ago
Previous ID SR-7781
Radar None
Original Reporter @Dante-Broggi
Type Improvement

Attachment: Download

Additional Detail from JIRA | | | |------------------|-----------------| |Votes | 0 | |Component/s | Compiler | |Labels | Improvement | |Assignee | None | |Priority | Medium | md5: aaa703f6c947787ce65f7969fcca5ad1

Issue Description:

When implementing a type's `BidirectionalCollection` conformance, the compiler sometimes reports that `index(after🙂` is a near match for `index(before🙂`. This is obvious, but unimportant as `index(after🙂` is also an (indirect) requirement of `BidirectionalCollection`. In addition, this diagnostic prevents the "add stubs" fix-me from being emitted.

![](I know….png)

belkadan commented 6 years ago

@DougGregor, you have a dup for this, right?