2010-04-07 Jb Evain <jbevain@novell.com>
[mcs.git] / ilasm / tests / test-custom-mod-1.il
blob76b5e7b3f33bd7c72d3d9dd5db502f159ae5445f
1 // Test for custom modifiers (modreq, modopt)
2 // They become part of method signature
3 // test case from bug #80261
5 .assembly extern mscorlib
7   .ver 1:0:5000:0
8   .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
10 .assembly 'property'
12   .hash algorithm 0x00008004
13   .ver  0:0:0:0
15 .module property.dll // GUID = {82691A71-F9F3-480E-96B0-09358B1EDA12}
17   .class public auto ansi beforefieldinit TestMods
18         extends [mscorlib]System.Object
19   {
20     .field static int32 modopt ([mscorlib] System.Int32) foo
22     // method line 1
23     .method public hidebysig  specialname  rtspecialname
24            instance default void .ctor ()  cil managed
25     {
26         // Method begins at RVA 0x20ec
27         // Code size 7 (0x7)
28         .maxstack 8
29         IL_0000:  ldarg.0
30         IL_0001:  call instance void object::.ctor()
31         IL_0006:  ret
32     } // end of method TestMods::.ctor
34     // method line 2
35     .method public static  hidebysig  specialname
36            default int32 modopt ([mscorlib]System.String)
37            modreq ([mscorlib]System.ValueType) get_Prop ()  cil managed
38     {
39         // Method begins at RVA 0x20f4
40         // Code size 3 (0x3)
41         .maxstack 8
42         IL_0000:  ldc.i4.s 0x0b
43         IL_0002:  ret
44     } // end of method TestMods::get_Prop
46     // method line 3
47     .method public static  hidebysig
48            default int64 modopt ([mscorlib]System.GC)
49            modreq ([mscorlib]System.Exception) 'method' (float64 d)  cil
50 managed
51     {
52         // Method begins at RVA 0x20f8
53         // Code size 6 (0x6)
54         .maxstack 8
55         IL_0000:  ldarg.0
56         IL_0001:  conv.i4
57         IL_0002:  ldc.i4.s 0x0f
58         IL_0004:  add
59         IL_0005:  ret
60     } // end of method TestMods::method
62         .method private static  hidebysig default void Main ()  cil managed
63         {
64                 .entrypoint
65                 ret
66         }
68         .property int32 Prop ()
69         {
70                 .get default int32  
71                         modopt ([mscorlib]System.String)  
72                         modreq ([mscorlib]System.ValueType) 
73                         TestMods::get_Prop () 
74         }
75   } // end of class TestMods