Re: [swift-dev] Anonymous closure arguments vs varargs

2017-01-06 Thread Tino Heth via swift-dev
> This sounds like a cosmetic proposal that doesn’t change semantics, so I > don’t think it’s directly related to the change I’m proposing. Well, you're the expert here, and I haven't looked at the compiler source at all — but as I understand your first message, there are special vararg-types (

Re: [swift-dev] Anonymous closure arguments vs varargs

2017-01-06 Thread Douglas Gregor via swift-dev
Hi Slava, > On Jan 4, 2017, at 6:28 PM, Slava Pestov via swift-dev > wrote: > > Hi all, > > In Swift 3.0, the following examples both typecheck: > > let fn1: ([Int]) -> () = { > let _: [Int] = $0 > } > > let fn2: (Int...) -> () = { > let _: [Int] = $0 > } > > This stopped working due to a

Re: [swift-dev] Anonymous closure arguments vs varargs

2017-01-05 Thread Slava Pestov via swift-dev
> On Jan 5, 2017, at 1:05 AM, Tino Heth <2...@gmx.de> wrote: > > Hi there, > >> I think it would be better if we permitted an implicit conversion between >> (T…) -> () and ([T]) -> () > There has been a proposal to replace the "…" with a "variadic"-annotation (on > arrays, or even on all types

Re: [swift-dev] Anonymous closure arguments vs varargs

2017-01-05 Thread Tino Heth via swift-dev
Hi there, > I think it would be better if we permitted an implicit conversion between > (T…) -> () and ([T]) -> () There has been a proposal to replace the "…" with a "variadic"-annotation (on arrays, or even on all types that can be expressed as arrays): https://github.com/Haravikk/swift-evolu

[swift-dev] Anonymous closure arguments vs varargs

2017-01-04 Thread Slava Pestov via swift-dev
Hi all, In Swift 3.0, the following examples both typecheck: let fn1: ([Int]) -> () = { let _: [Int] = $0 } let fn2: (Int...) -> () = { let _: [Int] = $0 } This stopped working due to a regression in master so I'm looking at fixing it. While investigating this, I noticed that this variant