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.cs9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/Mono.Linker.Tests.Cases/Inheritance.VirtualMethods/VirtualMethodGetsStrippedIfImplementingMethodGetsInvokedDirectly.cs b/test/Mono.Linker.Tests.Cases/Inheritance.VirtualMethods/VirtualMethodGetsStrippedIfImplementingMethodGetsInvokedDirectly.cs
index 76457ce53..eaae2a4aa 100644
--- a/test/Mono.Linker.Tests.Cases/Inheritance.VirtualMethods/VirtualMethodGetsStrippedIfImplementingMethodGetsInvokedDirectly.cs
+++ b/test/Mono.Linker.Tests.Cases/Inheritance.VirtualMethods/VirtualMethodGetsStrippedIfImplementingMethodGetsInvokedDirectly.cs
@@ -12,7 +12,9 @@ namespace Mono.Linker.Tests.Cases.Inheritance.VirtualMethods
[KeptMember (".ctor()")]
class B
{
- [Kept] // TODO: Would be nice to be removed
+ // TODO: Would be nice to be removed
+ // https://github.com/dotnet/linker/issues/3097
+ [KeptBy (typeof (A), nameof (A.Foo), "BaseMethod")]
public virtual void Foo ()
{
}
@@ -22,7 +24,10 @@ namespace Mono.Linker.Tests.Cases.Inheritance.VirtualMethods
[KeptBaseType (typeof (B))]
class A : B
{
- [Kept]
+ // Bug: https://github.com/dotnet/linker/issues/3078
+ // Linker should mark for DirectCall as well as OverrideOnInstantiatedType, not just OverrideOnInstantiatedType
+ //[KeptBy (typeof(A), nameof(Foo), DependencyKind.DirectCall)]
+ [KeptBy (typeof (A), "OverrideOnInstantiatedType")]
public override void Foo ()
{
}