Files
swift-mirror/test/Interop/Cxx/class/Inputs/conforms-to.h
Egor Zhdan 45b22542d5 [cxx-interop] Propagate CONFORMS_TO attribute to derived classes
If `struct Base` is a public base class of `struct Derived`, and `Base` is annotated with `__attribute__((swift_attr("conforms_to:MyModule.MyProto")))`, `Derived` will now also get a conformance to `MyProto`.

rdar://113971944
2023-12-07 18:11:37 +00:00

41 lines
1.2 KiB
C

#ifndef TEST_INTEROP_CXX_CLASS_INPUTS_DESTRUCTORS_H
#define TEST_INTEROP_CXX_CLASS_INPUTS_DESTRUCTORS_H
struct
__attribute__((swift_attr("conforms_to:SwiftTest.Testable")))
HasTest {
void test() const;
};
struct
__attribute__((swift_attr("conforms_to:SwiftTest.Playable")))
__attribute__((swift_attr("import_reference")))
__attribute__((swift_attr("retain:immortal")))
__attribute__((swift_attr("release:immortal")))
HasPlay {
void play() const;
};
struct
__attribute__((swift_attr("conforms_to:ImportedModule.ProtocolFromImportedModule")))
HasImportedConf {
void testImported() const;
};
struct DerivedFromHasTest : HasTest {};
struct DerivedFromDerivedFromHasTest : HasTest {};
struct __attribute__((swift_attr("conforms_to:SwiftTest.Testable")))
DerivedFromDerivedFromHasTestWithDuplicateArg : HasTest {};
struct DerivedFromHasPlay : HasPlay {};
struct DerivedFromDerivedFromHasPlay : HasPlay {};
struct HasTestAndPlay : HasPlay, HasTest {};
struct DerivedFromHasTestAndPlay : HasPlay, HasTest {};
struct DerivedFromHasImportedConf : HasImportedConf {};
struct DerivedFromDerivedFromHasImportedConf : HasImportedConf {};
#endif // TEST_INTEROP_CXX_CLASS_INPUTS_DESTRUCTORS_H