This is filed here:

    https://bugs.swift.org/browse/SR-586

There was some discussion about it on the list about whether this is a bug or a 
dubious feature. Douglas Gregor recently weighed in on that:

> I consider this a bug. The removal of implicit tuple splats should, IMO, 
> encompass making $0 consistently capture the first argument. I’d love for 
> this to happen in Swift 3.
https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160627/022448.html

Cheers, P


> On Jul 3, 2016, at 4:04 PM, Anton Zhilin via swift-evolution 
> <[email protected]> wrote:
> 
> [1,2,3].reduce(0) { $1 }  //=> 3
> [1,2,3].reduce(0) { $0 }  // error :(
> 
> Am I requesting too much from type checker?
> Will recent function type proposals resolve the issue?
> 
> _______________________________________________
> swift-evolution mailing list
> [email protected]
> https://lists.swift.org/mailman/listinfo/swift-evolution

_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to