I kind of understand that the last line (25) must be an error,
but since the "corresponding" lines (12, 16 and 21) compile fine, I can't help but feel that it's somewhat inconsistent:
func fnG<T>(v: T) { print("Function: \(__FUNCTION__), Value: \(v), Type: \(T.self)") }
typealias A = (Int)
func fnA (v: A) { print("Function: \(__FUNCTION__), Value: \(v), Type: \(A.self)") }
typealias B = (Int, Int)
func fnB (v: B) { print("Function: \(__FUNCTION__), Value: \(v), Type: \(B.self)") }
fnG( ((1)) ) // Prints: Function: fnG, Value: 1, Type: Int
fnG( (1) ) // Prints: Function: fnG, Value: 1, Type: Int
fnG( 1 ) // Prints: Function: fnG, Value: 1, Type: Int <-- OK
fnA( ((1)) ) // Prints: Function: fnA, Value: 1, Type: Int
fnA( (1) ) // Prints: Function: fnA, Value: 1, Type: Int
fnA( 1 ) // Prints: Function: fnA, Value: 1, Type: Int <-- OK
fnG( ((1, 2)) ) // Prints: Function: fnG, Value: (1, 2), Type: (Int, Int)
fnG( (1, 2) ) // Prints: Function: fnG, Value: (1, 2), Type: (Int, Int)
fnG( 1, 2 ) // Prints: Function: fnG, Value: (1, 2), Type: (Int, Int) <-- OK
fnB( ((1, 2)) ) // Prints: Function: fnB, Value: (1, 2), Type: (Int, Int)
fnB( (1, 2) ) // Prints: Function: fnB, Value: (1, 2), Type: (Int, Int)
fnB( 1, 2 ) // Error: Extra argument in call <-- NOT OK ...So, why is line 25 an error, while 21, 16 and 12 are not?
(I understand that having fnA's and fnB's parameter types as typealiases or not doesn't matter, it's just to highlight the "symmetry". I also understand that fnG is generic while fnA and fnB are not, but the question is not about that per se.)