We can disallow putting types in parentheses in single-element tuple meaning. For example, (Int) -> (Double) will be illegal because of (Double). (Int) -> (Double) -> Bool will be legal, because parentheses mean function type here. (Int) -> () will be legal, because () means Void here. This can be theme of a separate proposal.
- Anton On 22.04.16, Vladimir.S wrote: What I really don't like is that we can have all this: func f1() -> (Void) {..} func f2(Void) -> ((Void)) {..} func f3() -> (((()))) {..} func f4(((Void))) -> (Void) {..} func f5() -> ((Void)) {..} func f6((())) -> (((()))) {..} and all is equivalent for func f() -> () {..}
_______________________________________________ swift-evolution mailing list swift-evolution@swift.org https://lists.swift.org/mailman/listinfo/swift-evolution