Vladimir.S via swift-evolution <swift-evolution@...> writes: > 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.
In the example, that's how I expect that to parse: let z = ().init() // just demo, does not compile I mean, first () is type, and second () is its initializer. By the way, this is one thing that Void can do, but () cannot. Are there any others? _______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
