extension Future { func foo(_ f: (Int) -> Void) { ... } } extension Future where Failure == Never { func foo(_ f: (String) -> Void) { ... } }