Commits

Doug Gregor committed 17422d5bee9
The type of an instance method in a generic class is actually a polymorphic function type. For example, given struct X<T> { func f(a : T) -> Int { } } The type of X.f is <T> (this : [byref] X<T>) -> (a : T) -> Int If we have a call to f, e.g., var xi : X<Int> xi.f(5) it will be represented as X.f specialized to type (this : [byref] X<Int>) -> (a : Int) -> Int and then called with 'xi' (DotSyntaxCallExpr) and finally 5 (ApplyExpr). The actual deduction of arguments is not as clean as I'd like, generic functions of generic classes are unsupported, static functions are broken, and constructors/destructors are broken. Fixes for those cases will follow. Swift SVN r2470