blob: 92f61358d397be860adc88c1cede168131a80744 (
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
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
.assembly extern System.Console { }
.assembly extern mscorlib {}
.assembly TestCase0 {}
// =============== CLASS MEMBERS DECLARATION ===================
.class interface private abstract auto ansi I`1<T>
{ .method public hidebysig newslot abstract virtual instance string Foo() cil managed {} }
.class interface private abstract auto ansi J`1<T>
{
.method public hidebysig newslot abstract virtual instance string Bar1() cil managed {}
.method public hidebysig newslot abstract virtual instance string Bar2() cil managed {}
}
.class private auto ansi beforefieldinit A`1<U>
implements class I`1<!U>, class J`1<!U>
{
.method public hidebysig virtual instance string Foo() cil managed
{
ldstr "A::Foo"
ret
}
.method public hidebysig virtual instance string Bar1() cil managed
{
.maxstack 8
ldstr "A::Bar1"
ret
}
.method public hidebysig virtual instance string Bar2() cil managed
{
.maxstack 8
ldstr "A::Bar2"
ret
}
.method public hidebysig specialname rtspecialname instance void .ctor() cil managed {}
}
.class private auto ansi beforefieldinit B`2<V,W>
extends class A`1<!V>
implements class I`1<!W>, class J`1<!W>
{
.method public hidebysig newslot virtual instance string Foo() cil managed
{
ldstr "B::Foo"
ret
}
.method public hidebysig newslot virtual instance string Bar1() cil managed
{
.override method instance string class A`1<!V>::Bar1()
.maxstack 8
ldstr "B::Bar1"
ret
}
.method public hidebysig virtual instance string Bar2() cil managed
{
.maxstack 8
ldstr "B::Bar2"
ret
} .method public hidebysig specialname rtspecialname instance void .ctor() cil managed {}
}
.class private auto ansi beforefieldinit C extends class B`2<class C,class C>
{ .method public hidebysig specialname rtspecialname instance void .ctor() cil managed {} }
.class public auto ansi beforefieldinit Test extends [mscorlib]System.Object
{
.method public hidebysig static int32 Main() cil managed
{
.entrypoint
newobj instance void C::.ctor()
callvirt instance string class I`1<class C>::Foo()
ldstr "B::Foo"
call bool [mscorlib]System.String::op_Inequality(string, string)
brtrue FAILURE
newobj instance void C::.ctor()
callvirt instance string class A`1<class C>::Bar1()
ldstr "B::Bar1"
call bool [mscorlib]System.String::op_Inequality(string,string)
brtrue FAILURE
newobj instance void C::.ctor()
callvirt instance string class A`1<class C>::Bar2()
ldstr "B::Bar2"
call bool [mscorlib]System.String::op_Inequality(string,string)
brtrue FAILURE
newobj instance void C::.ctor()
callvirt instance string class J`1<class C>::Bar2()
ldstr "B::Bar2"
call bool [mscorlib]System.String::op_Inequality(string,string)
brtrue FAILURE
PASS:
ldstr "Pass"
call void [System.Console]System.Console::WriteLine(string)
ldc.i4.s 100
ret
FAILURE:
ldstr "Failed!"
call void [System.Console]System.Console::WriteLine(string)
ldc.i4.m1
ret
}
}
|