forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathOverrideOfRecursiveInterfaceIsRemoved.cs
More file actions
87 lines (78 loc) · 3.16 KB
/
OverrideOfRecursiveInterfaceIsRemoved.cs
File metadata and controls
87 lines (78 loc) · 3.16 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Mono.Linker.Tests.Cases.Expectations.Assertions;
using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.RecursiveInterfaces
{
[SkipUnresolved(true)]
[Define("IL_ASSEMBLY_AVAILABLE")]
[SetupCompileBefore("library.dll", new string[] { "Dependencies/OverrideOfRecursiveInterfaceIsRemoved.il" })]
[Kept]
[KeptTypeInAssembly("library.dll", "Program/A")]
[KeptInterfaceOnTypeInAssembly("library.dll", "Program/A", "library.dll", "Program/IDerived")]
[KeptTypeInAssembly("library.dll", "Program/IDerived")]
[KeptInterfaceOnTypeInAssembly("library.dll", "Program/IDerived", "library.dll", "Program/IMiddleUnused")]
[KeptTypeInAssembly("library.dll", "Program/IMiddleUnused")]
[KeptInterfaceOnTypeInAssembly("library.dll", "Program/IMiddleUnused", "library.dll", "Program/IBaseUsed")]
[KeptTypeInAssembly("library.dll", "Program/IBaseUsed")]
[KeptInterfaceOnTypeInAssembly("library.dll", "Program/IMiddleUnused", "library.dll", "Program/IBaseUnused")]
[KeptTypeInAssembly("library.dll", "Program/IBaseUnused")]
[KeptOverrideOnMethodInAssembly("library.dll", "Program/A", "N", "System.Void Program/IDerived::N()")]
[KeptOverrideOnMethodInAssembly("library.dll", "Program/A", "M", "System.Void Program/IBaseUsed::M()")]
[RemovedOverrideOnMethodInAssembly("library.dll", "Program/A", "M", "System.Void Program/IBaseUnused::M()")]
[RemovedOverrideOnMethodInAssembly("library.dll", "Program/A", "O", "System.Void Program/IMiddleUnused::O()")]
[RemovedMemberInAssembly("library.dll", "Program/IBaseUnused", "M()")]
[RemovedMemberInAssembly("library.dll", "Program/IMiddleUnused", "O()")]
public class OverrideOfRecursiveInterfaceIsRemoved
{
[Kept]
public static void Main()
{
#if IL_ASSEMBLY_AVAILABLE
Program.MyTest();
_ = typeof(Program.IBaseUnused);
#endif
}
}
//public class Program
//{
// public static void MyTest()
// {
// UseNThroughIDerived<A>();
// A.M();
// A.O();
// }
// static void UseNThroughIDerived<T>() where T : IDerived {
// T.N();
// }
// static void UseMThroughIDerived<T>() where T : IBaseUsed {
// T.M();
// }
// interface IBaseUnused
// {
// static abstract void M();
// }
// interface IBaseUsed
// {
// static abstract void M();
// }
// interface IMiddleUnused : IBaseUnused, IBaseUsed
// {
// static abstract void O();
// }
// interface IDerived : IMiddleUnused
// {
// static abstract void N();
// }
// class A : IDerived {
// public static void M() {}
// public static void N() {}
// public static void O() {}
// }
//}
}