[swift-evolution] [Discussion] Zero-element tuple glitch

Vladimir.S svabox at gmail.com
Sun Jul 3 16:14:05 CDT 2016


On 03.07.2016 23:53, Anton Zhilin via swift-evolution wrote:
> let x = (Int, Int)(1, 2)  //=> (1, 2)
> let y = (Int)(1)          //=> 1
> let z = ()()              // error :(
>
> Am I requesting too much from type checker?

As I understand, because () is Void, you can't have anything additional for 
it. It is just Void, like you write 'let z = Void Void'. I.e. only 'let z = 
()' allowed.

>
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
>


More information about the swift-evolution mailing list