Pre-Pitch: Explicit protocol fulfilment with the 'conformance' keyword

That would be a welcome change! +1

Here's another motivating example and a common gotcha – conformance should also catch it when trying to override what's only an extension method.

protocol P {
    func foo()
    //func bar()  // <- Uncommenting this would fix the error.
}

extension P {
    func bar() { ... }
}

struct S: P {
    conformance func foo() { ... } // OK

    // error: function bar() does not fulfill any protocol requirement.
    conformance func bar() { ... }
}
5 Likes