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/Inheritance.VirtualMethods/VirtualMethodGetsStrippedIfImplementingMethodGetsInvokedDirectly.cs')
-rw-r--r--test/Mono.Linker.Tests.Cases/Inheritance.VirtualMethods/VirtualMethodGetsStrippedIfImplementingMethodGetsInvokedDirectly.cs27
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 ()
+ {
+ }
+ }
+ }
+}