mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Sema would directly check for the presence of the @objcMembers attribute, and inherit it from the immediate superclass in validateDecl(). We don't want validateDecl() to have side effects like this and this was already a problem, because it would not inherit the attribute transitively in some cases. Instead, add a ClassDecl::hasObjCMembers() method that walks over all ancestors and caches the result. <rdar://problem/46420252>
4 lines
110 B
Swift
4 lines
110 B
Swift
@objcMembers class BaseClassWithObjCMembers {}
|
|
|
|
class OtherClassWithObjCMembers : BaseClassWithObjCMembers {}
|