diff options
Diffstat (limited to 'test/Mono.Linker.Tests.Cases/Inheritance.VirtualMethods/VirtualMethodGetsStrippedIfImplementingMethodGetsInvokedDirectly.cs')
-rw-r--r-- | test/Mono.Linker.Tests.Cases/Inheritance.VirtualMethods/VirtualMethodGetsStrippedIfImplementingMethodGetsInvokedDirectly.cs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/Mono.Linker.Tests.Cases/Inheritance.VirtualMethods/VirtualMethodGetsStrippedIfImplementingMethodGetsInvokedDirectly.cs b/test/Mono.Linker.Tests.Cases/Inheritance.VirtualMethods/VirtualMethodGetsStrippedIfImplementingMethodGetsInvokedDirectly.cs new file mode 100644 index 000000000..d6b4969fe --- /dev/null +++ b/test/Mono.Linker.Tests.Cases/Inheritance.VirtualMethods/VirtualMethodGetsStrippedIfImplementingMethodGetsInvokedDirectly.cs @@ -0,0 +1,27 @@ +using Mono.Linker.Tests.Cases.Expectations.Assertions; + +namespace Mono.Linker.Tests.Cases.Inheritance.VirtualMethods { + class VirtualMethodGetsStrippedIfImplementingMethodGetsInvokedDirectly { + public static void Main () + { + new A ().Foo (); + } + + [KeptMember (".ctor()")] + class B { + [Kept] // TODO: Would be nice to be removed + public virtual void Foo () + { + } + } + + [KeptMember (".ctor()")] + [KeptBaseType (typeof (B))] + class A : B { + [Kept] + public override void Foo () + { + } + } + } +} |