mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Because all metaclasses ultimately inherit from NSObject, instance members of NSObject are also visible as static members of NSObject. If the instance member is a property, we import the getter as an ordinary static method, and not a static property. The lazy loading path normally checks for the presence of alternate decls with the same name, but it was failing to do this check if the imported decl was a property and the alternate decl was attached to the accessor and not the property itself. This wasn't a problem until recently, because we weren't lazy loading members of NSObject itself, since it had protocol conformances; now that we are, this problem was exposed. Fixes <rdar://problem/59170514>.