mirror of
https://github.com/apple/swift.git
synced 2026-06-27 12:25:55 +02:00
3883ff0b29
There are a number of things that can only be written within the main type definition (e.g., required initializers, stored properties), making it far more likely that we'll get false positives from the newly-introduced "near-miss" warnings for protocol conformances. Moreover, sometimes a number of protocol conformances are placed on the main type definition, increasing the potential for false positives. Suppress near-miss warnings for potential candidates when the protocol conformance is stated on the main type definition itself. Therefore, we only perform near-miss checking of non-@objc requirements when the conformance itself was declared on an extension, which is roughly the development style that near-miss warnings favor. Fixes rdar://problem/37283860.