This Swift 5.10 code compiles in Xcode 15.4:
protocol MyProtocol {
func foo(with parameter: Bool) -> Bool
}
class Conforms: MyProtocol {
func foo(with anotherParameter: Bool) -> Bool {
true
}
}
As you can see, it assumes Conforms
conforms to the protocol, even though it has a different function’s parameter.
Is this expected behavior?