Avatar
norio_nomura 3/22/2018 9:40 AM
今日調べてたStringProtocol.hasPrefix(_:)が似た状況かも。 https://github.com/apple/swift/commit/f9b3e14137ac2f50e93aa2c1db28511e05f88e75
…14390)
  • Use Swift-native Character iteration for hasPrefix/Suffix
  • Remove old tests for removed C shims
9:41 AM
requirementが public protocol StringProtocol … { … func hasPrefix(_ prefix: String) -> Bool で、実装が extension StringProtocol { … public func hasPrefix<Prefix: StringProtocol>(_ prefix: Prefix) -> Bool { になってる。 (edited)