Commits

Doug Gregor committed 5a83c864555
Eliminate default arguments from TupleType. In Swift, default arguments are associated with a function or initializer's declaration---not with its type. This was not always the case, and TupleType's ability to store a default argument kind is a messy holdover from those dark times. Eliminate the default argument kind from TupleType, which involves migrating a few more clients over to declaration-centric handling of default arguments. Doing so is usually a bug-fix anyway: without the declaration, one didn't really have The SILGen test changes are due to a name-mangling fix that fell out of this change: a tuple type is mangled differently than a non-tuple type, and having a default argument would make the parameter list of a single-parameter function into a tuple type. Hence, func foo(x: Int = 5) would get a different mangling from func foo(x: Int) even though we didn't actually allow overloading. Fixes rdar://problem/24016341, and helps us along the way to SE-0111 (removing the significance of argument labels) because argument labels are also declaration-centric, and need the same information.