2 // CIL which breaks the ECMA-335 rules.
3 // this CIL should fail verification by a conforming CLI verifier.
5 .assembly 'call_missing_class_generated'
7 .hash algorithm 0x00008004
11 .class public auto ansi beforefieldinit MissingMember extends [mscorlib]System.Object
13 .method public hidebysig specialname rtspecialname instance default void .ctor () cil managed
17 call instance void object::.ctor()
21 .method static private hidebysig void PrivateMethod () cil managed
28 .field private int32 privateField
31 .class public auto ansi beforefieldinit Driver extends [mscorlib]System.Object
33 .method public hidebysig specialname rtspecialname instance default void .ctor () cil managed
37 call instance void object::.ctor()
41 .method public static void NoInline() cil managed
47 .method public static void TestMethod() cil managed
50 call void Driver::NoInline()
51 call int32 [mscorlib]MissingClass::Method()
58 .method public static int32 Main() cil managed
62 .locals init ( class [mscorlib]System.Exception V_0, int32 V_1)
68 call void Driver::TestMethod()
69 ldstr ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>call_missing_class did not throw an exception"
70 call void class [mscorlib]System.Console::WriteLine(string)
75 catch [mscorlib]System.Exception {
79 callvirt instance class [mscorlib]System.Type class [mscorlib]System.Exception::GetType()
80 ldtoken [mscorlib]System.TypeLoadException
81 call class [mscorlib]System.Type class [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
83 ldstr ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>call_missing_class thrown {0} instead of System.TypeLoadException"
85 callvirt instance class [mscorlib]System.Type class [mscorlib]System.Exception::GetType()
86 call void class [mscorlib]System.Console::WriteLine(string, object)