tag a couple of obsolete members
[mcs.git] / ilasm / tests / gen-constraints1.il
blob1c791f7529053846eb057e9c8d4bc2a989c8fcef
1 // Test for constraints on generic parameters
3 .assembly extern mscorlib
5   .ver 2:0:0:0
7 .assembly 'const'
9   .custom instance void class [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() =  (
10                 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78   
11                 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01       ) 
13   .ver  0:0:0:0
15 .module const.dll
17   .class interface private auto ansi abstract ITest1
18   {
19   } 
21   .class interface private auto ansi abstract ITest
22   {
23   } 
25   .class private auto ansi beforefieldinit bb
26         extends [mscorlib]System.Object
27   {
28     .method public hidebysig  specialname  rtspecialname 
29            instance default void .ctor ()  cil managed 
30     {
31         .maxstack 8
32         IL_0000:  ldarg.0 
33         IL_0001:  call instance void object::.ctor()
34         IL_0006:  ret 
35     } 
37   } 
39   /* Constraints : .ctor, base class, interfaces */
40   .class private auto ansi beforefieldinit gen`1 <.ctor (class bb, class [mscorlib]System.Collections.Generic.ICollection`1<!T>, class [mscorlib]System.Collections.ICollection, class ITest1) T>
41         extends [mscorlib]System.Object
42   {
43     .method public hidebysig  specialname  rtspecialname 
44            instance default void .ctor ()  cil managed 
45     {
46         .maxstack 8
47         IL_0000:  ldarg.0 
48         IL_0001:  call instance void object::.ctor()
49         IL_0006:  ret 
50     } 
51     
52     /* Constraints on a method's generic params */
53     .method public hidebysig 
54            instance default void foo<.ctor (class [mscorlib]System.Collections.Generic.ICollection`1<!!0>) M> ()  cil managed 
55     {
56         .maxstack 8
57         IL_0000:  ret 
58     }
60   } 
62   /* Constraint : class */
63   .class private auto ansi beforefieldinit foo`1<class M>
64         extends [mscorlib]System.Object
65   {
66     .method public hidebysig  specialname  rtspecialname 
67            instance default void .ctor ()  cil managed 
68     {
69         .maxstack 8
70         IL_0000:  ldarg.0 
71         IL_0001:  call instance void object::.ctor()
72         IL_0006:  ret 
73     } 
75   } 
77   /* Constraint : valuetype */
78   .class private auto ansi beforefieldinit bar`1<valuetype M>
79         extends [mscorlib]System.Object
80   {
81     .method public hidebysig  specialname  rtspecialname 
82            instance default void .ctor ()  cil managed 
83     {
84         .maxstack 8
85         IL_0000:  ldarg.0 
86         IL_0001:  call instance void object::.ctor()
87         IL_0006:  ret 
88     } 
90   } 
92   /* Constraint : generic constraint */
93   .class private auto ansi beforefieldinit abc`1 <(class foo`1<class bb>) M>
94         extends [mscorlib]System.Object
95   {
96     .method public hidebysig  specialname  rtspecialname 
97            instance default void .ctor ()  cil managed 
98     {
99         .maxstack 8
100         IL_0000:  ldarg.0 
101         IL_0001:  call instance void object::.ctor()
102         IL_0006:  ret 
103     } 
105   }