Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/linker.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'test/Mono.Linker.Tests.Cases/Basic/InterfaceMethodImplementedOnBaseClassDoesNotGetStripped.cs')
-rw-r--r--test/Mono.Linker.Tests.Cases/Basic/InterfaceMethodImplementedOnBaseClassDoesNotGetStripped.cs37
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