blob: 8b876f777371f6c8a47733c67273d660eea9224f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
using Mono.Linker.Tests.Cases.Expectations.Assertions;
namespace Mono.Linker.Tests.Cases.Inheritance.VirtualMethods
{
class VirtualMethodGetsPreservedIfBaseMethodGetsInvoked
{
public static void Main ()
{
new A ();
new B ().Foo ();
}
[KeptMember (".ctor()")]
class B
{
[Kept]
public virtual void Foo ()
{
}
}
[KeptMember (".ctor()")]
[KeptBaseType (typeof (B))]
class A : B
{
[KeptBy (typeof (A), "OverrideOnInstantiatedType")]
public override void Foo ()
{
}
}
}
}
|