Avatar
swiftbot BOT 6/7/2018 2:23 PM
Author icon
tarunon
extension Sequence { public func compact<T>() -> [T] where Element == Optional<T> { return _compactMap { $0 } } } let b: [Int] = [] print(b.compact)
Version:
swift-4.1.1-RELEASE
Output:
Error:
/usercode/main.swift:7:9: error: generic parameter 'T' could not be inferred print(b.compact) ^