rework how let-ness of 'self' is determined, to be based on the type of self.

This time, it correctly handles static methods, which have metatypetype.


Swift SVN r11302
This commit is contained in:
Chris Lattner
2013-12-14 06:18:42 +00:00
parent 1b161ff043
commit b26ac34ade
2 changed files with 17 additions and 12 deletions

View File

@@ -1705,7 +1705,7 @@ Parser::parseDeclFunc(SourceLoc StaticLoc, unsigned Flags,
// container type as an element named 'self'.
//
// This turns an instance function "(int)->int" on FooTy into
// "(this: [inout] FooTy)->(int)->int", and a static function
// "(this: @inout FooTy)->(int)->int", and a static function
// "(int)->int" on FooTy into "(this: [inout] FooTy.metatype)->(int)->int".
// Note that we can't actually compute the type here until Sema.
if (HasContainerType) {