1 //LDTOKEN test for byref types
2 //it should print "System.Int32&" and return 0
4 .assembly extern mscorlib
7 .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
11 .hash algorithm 0x00008004
14 .module token.exe // GUID = {8DBC8A7B-2036-4640-B76C-DCEA4F743D35}
17 .class public auto ansi beforefieldinit TestClass
18 extends [mscorlib]System.Object
22 .method public hidebysig specialname rtspecialname
23 instance default void .ctor () cil managed
25 // Method begins at RVA 0x20ec
29 IL_0001: call instance void object::.ctor()
31 } // end of method TestClass::.ctor
34 .method public static hidebysig
35 default int32 Main () cil managed
37 // Method begins at RVA 0x20f4
39 // Code size 36 (0x24)
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)
47 IL_000c: call void class [mscorlib]System.Console::WriteLine(object)
49 IL_0012: callvirt instance bool class [mscorlib]System.Type::get_IsByRef()
50 IL_0017: brfalse IL_0022
57 } // end of method TestClass::Main
59 } // end of class TestClass