This is more of an unpleasant and cosmetic issue than anything else, but there are some consistency issues with autocompletion in Xcode, and I would really appreciate it if anyone has a solution for this.
Consider the MyProtocol protocol, which has a property and method:
public protocol MyProtocol { var variable: String { get } func method() }
And class A , which accepts MyProtocol and implements requirements for protocol compliance:
public class A { ... } extension A: MyProtocol { public var variable: String { get { return "String from A." } } public func method() { print("Method called.") } }
Problem:
When accessing the members of instance A , protocol methods are displayed twice, while properties are displayed only once:

If everything is documented in the code, it becomes clear that the protocol properties are hidden, and the protocol methods remain visible in autocomplete. The same applies to the default implementations of protocol methods - still visible.
Another thing that makes this problem even more peculiar is that if an instance, for example, A is created in the same file in which the class is declared, and they are accessed by this instance in the same file, then the protocol method disappears from autocomplete:

But if the same instance (which is now in the global scope) is called from another file, the protocol method reappears in autocomplete.
So my question is: does anyone know how to hide duplicate protocol methods from autocomplete?
Versions:
Xcode: 7.3 (7D175)
Swift: 2.2