Avatar
swiftbot BOT 6/25/2018 5:29 AM
Author icon
koher
extension Optional { @_specialize(exported: true, where Wrapped == Int, S == [Int]) func foo<S : Sequence>(_ sequence: S) -> [Wrapped] { return Array(sequence) + (self.map { [$0] } ?? []) } }
Version:
swift-4.1.1-RELEASE
Output:
Error:
/usercode/main.swift:4:16: error: generic parameter 'S' could not be inferred return Array(sequence) + (self.map { [$0] } ?? []) ^