mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
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
41 lines
1.2 KiB
C
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
|