Commit Graph

1 Commits

Author SHA1 Message Date
Doug Gregor
34f3e7c4c0 Introduce rudimentary generic argument deduction as part of expression
coercion. Overload resolution uses this argument deduction when
dealing with generic functions, to determine when we can invoke a
generic function. When a generic function is selected, we create a
SpecializeExpr wrapping the DeclRefExpr to the generic function.

This is sufficient to type-check calls to simple things like a call to

  func identity<T>(x : T) -> T { return x }

with a value of known type. However, it's missing far too many pieces
to enumerate.



Swift SVN r2230
2012-06-23 00:05:00 +00:00