mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Parsed declarations would create an untyped 'self' parameter; synthesized, imported and deserialized declarations would get a typed one. In reality the type, if any, depends completely on the properties of the function in question, so we can just lazily create the 'self' parameter when needed. If the function already has a type, we give it a type right there; otherwise, we check if a 'self' was already created when we compute a function's type and set the type of 'self' then.
50 KiB
50 KiB