Commits

Joe Groff committed f52a766ef5a
Sema: Propagate sugar types through function calls Modify TupleToTuple and ScalarToTuple conversion to try to preserve the sugared types of their inputs when coercing. After typechecking a function application, try to determine if there is a consistent type sugar used for all of the elements of the input tuple whose types are equivalent to the result type, and if so, map the result type to that same sugar type. This makes it so that 1+1 returns an 'Int' and Foo(1) + Foo(1) returns a 'Foo' (if 'typealias Foo = Int'). Still to come: cases where the input tuple is shuffled, has varargs or default initializers; and some cases with literals where the constraint checker favors the declared argument type over the default literal type. Swift SVN r4247