blob: bc170287e4fd962faf919f4264fef368f3355a07 (
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
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
|
using Mono.Linker.Tests.Cases.Expectations.Assertions;
namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.OnReferenceType.NoKeptCtorButInterfaceNeeded {
public class GenericTypeWithConstraint3 {
public static void Main ()
{
Foo f = null;
Bar b = null;
Bar<BaseFoo2, BaseBar2>.Helper (f, b);
}
[Kept]
static class Bar<T, K> where T : IFoo where K : IBar {
[Kept]
public static void Helper (T arg, K arg2)
{
}
}
[Kept]
[KeptInterface (typeof (IFoo))]
abstract class BaseFoo : IFoo {
}
[Kept]
[KeptBaseType (typeof (BaseFoo))]
abstract class BaseFoo2 : BaseFoo {
}
[Kept]
[KeptInterface (typeof (IBar))]
abstract class BaseBar : IBar {
}
[Kept]
[KeptBaseType (typeof (BaseBar))]
abstract class BaseBar2 : BaseBar {
}
[Kept]
[KeptBaseType (typeof (BaseFoo2))]
class Foo : BaseFoo2 {
}
[Kept]
[KeptBaseType (typeof (BaseBar2))]
class Bar : BaseBar2 {
}
[Kept]
interface IFoo {
}
[Kept]
interface IBar {
}
}
}
|