extension MyType: SetAlgebra {
//...
public init<each S: StringProtocol>(_ string: repeat each S) {
var result = [String]()
for s in repeat each string {
result.append(s.decomposedStringWithCanonicalMapping)
}
self.init(result, alreadyDecomposed: true)
}
}
The compiler wouldn't accept the zero-argument version of this method to satisfy the default initializer requirement. Am I missing something, or is this some sort of whoops over coverage?
I kind of mis-worded it. My case doesn't involve default argument values at all. In the past, we had issues where enumeration cases couldn't fill in something expecting a type-level property, although they have the same user interaction model. Variadic members should be able to satisfy requirements if one of their variations can match.