diff options
Diffstat (limited to 'test/Mono.Linker.Tests.Cases/Basic/InterfaceMethodImplementedOnBaseClassDoesNotGetStripped.cs')
-rw-r--r-- | test/Mono.Linker.Tests.Cases/Basic/InterfaceMethodImplementedOnBaseClassDoesNotGetStripped.cs | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/test/Mono.Linker.Tests.Cases/Basic/InterfaceMethodImplementedOnBaseClassDoesNotGetStripped.cs b/test/Mono.Linker.Tests.Cases/Basic/InterfaceMethodImplementedOnBaseClassDoesNotGetStripped.cs new file mode 100644 index 000000000..fa0b762a8 --- /dev/null +++ b/test/Mono.Linker.Tests.Cases/Basic/InterfaceMethodImplementedOnBaseClassDoesNotGetStripped.cs @@ -0,0 +1,37 @@ +using Mono.Linker.Tests.Cases.Expectations.Assertions; + +namespace Mono.Linker.Tests.Cases.Basic { + class InterfaceMethodImplementedOnBaseClassDoesNotGetStripped { + public static void Main () + { + I1 i1 = new Derived (); + i1.Used (); + } + + public interface I1 { + void Unused (); + + [Kept] + void Used (); + } + + [KeptMember (".ctor()")] + public class Base { + public void Unused () + { + } + + [Kept] + public void Used () + { + } + } + + [Kept] + [KeptMember (".ctor()")] + [KeptBaseType (typeof (Base))] + [KeptInterface (typeof (I1))] + public class Derived : Base, I1 { + } + } +}
\ No newline at end of file |