Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mono / tests / ldtoken_with_byref_typespec.2.il
1 //LDTOKEN test for byref types
2 //it should print "System.Int32&" and return 0 
3
4 .assembly extern mscorlib
5 {
6   .ver 1:0:5000:0
7   .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
8 }
9 .assembly 'token'
10 {
11   .hash algorithm 0x00008004
12   .ver  0:0:0:0
13 }
14 .module token.exe // GUID = {8DBC8A7B-2036-4640-B76C-DCEA4F743D35}
15
16
17   .class public auto ansi beforefieldinit TestClass
18         extends [mscorlib]System.Object
19   {
20
21     // method line 1
22     .method public hidebysig  specialname  rtspecialname 
23            instance default void .ctor ()  cil managed 
24     {
25         // Method begins at RVA 0x20ec
26         // Code size 7 (0x7)
27         .maxstack 8
28         IL_0000:  ldarg.0 
29         IL_0001:  call instance void object::.ctor()
30         IL_0006:  ret 
31     } // end of method TestClass::.ctor
32
33     // method line 2
34     .method public static  hidebysig 
35            default int32 Main ()  cil managed 
36     {
37         // Method begins at RVA 0x20f4
38         .entrypoint
39         // Code size 36 (0x24)
40         .maxstack 6
41         .locals init (
42                 class [mscorlib]System.Type     V_0)
43         IL_0000:  ldtoken [mscorlib]System.Int32&
44         IL_0005:  call class [mscorlib]System.Type class [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
45         IL_000a:  stloc.0 
46         IL_000b:  ldloc.0 
47         IL_000c:  call void class [mscorlib]System.Console::WriteLine(object)
48         IL_0011:  ldloc.0 
49         IL_0012:  callvirt instance bool class [mscorlib]System.Type::get_IsByRef()
50         IL_0017:  brfalse IL_0022
51
52         IL_001c:  ldc.i4.0 
53         IL_001d:  br IL_0023
54
55         IL_0022:  ldc.i4.1 
56         IL_0023:  ret 
57     } // end of method TestClass::Main
58
59   } // end of class TestClass
60