Well please no:
let fn2: ((Int, Int)) -> Void = { lhs, rhs in }
Instead use destructuring sugar pitched by Chris Lattner on the other thread:
let fn2: ((Int, Int)) -> Void = { ((lhs, rhs)) in }
That’s a correct error:
let fn3: (Int, Int) -> Void = { _ in }
This should be allowed, because we might want to work with the whole tuple and
not a desctructured elements only:
let fn4: ((Int, Int)) -> Void = { tuple in }
--
Adrian Zubarev
Sent with Airmail
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution