Files
swift-mirror/test/attr/Inputs/attr_objcMembers_other.swift
Slava Pestov bfcf24ee4e AST: Rework @objcMembers inheritance to not depend on validation order
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>
2018-12-12 15:12:38 -05:00

4 lines
110 B
Swift

@objcMembers class BaseClassWithObjCMembers {}
class OtherClassWithObjCMembers : BaseClassWithObjCMembers {}