// 故意编译失败:扩展方法的签名与协议要求不一致,不能算满足要求。 // 复现:swiftc Diagnostics/MismatchedDefault.swift protocol P { func f() -> String } extension P { func f() -> Int { 1 } } struct S: P {} print(S().f())