mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user