protocol Addable { associatedtype SomeType func sayHello() static func sayHello2(_ x: Self) -> Self static func + (a: Self, b: Self) -> Self } extension Addable { func sayHello() { print("hello<default>") } static func sayHello2(_ x: Self) -> Self { print("hello<default>"); return x } static func + (a: Self, b: Self) -> Self { print("add<default>"); return a } } extension Addable where SomeType == Int { func sayHello() { print("hello<Int>") } static func sayHello2(_ x: Self) -> Self { print("hello<Int>"); return x } static func + (a: Self, b: Self) -> Self { print("add<Int>"); return a } } struct Concrete<T>: Addable { typealias SomeType = T } let a = Concrete<Int>() a.sayHello() // prints hello<Int> _ = Concrete.sayHello2(a) // prints hello<Int> _ = a + a // prints add<default> ... why?
(edited)