[tests] Test loading references from LoadFrom and LoadFile contexts
[mono-project.git] / mono / tests / dim-diamondshape.il
blob063ebef844873793040029d02b63c4f5bd9dd865
2 //  Microsoft (R) .NET Framework IL Disassembler.  Version 4.6.1055.0
3 //  Copyright (c) Microsoft Corporation.  All rights reserved.
7 // Metadata version: v4.0.30319
8 .assembly extern mscorlib
10   .publickeytoken = (B7 7A 5C 56 19 34 E0 89 )                         // .z\V.4..
11   .ver 4:0:0:0
13 .assembly diamondshape
15   .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) 
16   .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78   // ....T..WrapNonEx
17                                                                                                              63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 )       // ceptionThrows.
19   // --- The following custom attribute is added automatically, do not uncomment -------
20   //  .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 07 01 00 00 00 00 ) 
22   .hash algorithm 0x00008004
23   .ver 0:0:0:0
25 .module diamondshape.exe
26 // MVID: {25B467F3-D284-4DB6-BAD4-C7EAC75CF064}
27 .imagebase 0x00400000
28 .file alignment 0x00000200
29 .stackreserve 0x00100000
30 .subsystem 0x0003       // WINDOWS_CUI
31 .corflags 0x00000001    //  ILONLY
32 // Image base: 0x010B0000
35 // =============== CLASS MEMBERS DECLARATION ===================
37 .class interface private abstract auto ansi IFoo
39   .method public hidebysig newslot virtual 
40           instance int32  Foo(int32 a) cil managed
41   {
42     // Code size       7 (0x7)
43     .maxstack  1
44     .locals init (int32 V_0)
45     IL_0000:  nop
46     IL_0001:  ldarg.1
47     IL_0002:  stloc.0
48     IL_0003:  br.s       IL_0005
50     IL_0005:  ldloc.0
51     IL_0006:  ret                 
52   } // end of method IFoo::Foo
54 } // end of class IFoo
56 .class interface private abstract auto ansi IFoo2
57        implements IFoo
59   .method public hidebysig newslot virtual final 
60           instance int32  Foo(int32 a) cil managed
61   {
62     .override IFoo::Foo
63     // Code size       20 (0x14)
64     .maxstack  2
65     .locals init (int32 V_0)
66     IL_0000:  nop
67     IL_0001:  ldstr      "At IFoo2.Foo"
68     IL_0006:  call       void [mscorlib]System.Console::WriteLine(string)
69     IL_000b:  nop
70     IL_000c:  ldarg.1
71     IL_000d:  ldc.i4.1
72     IL_000e:  add
73     IL_000f:  stloc.0
74     IL_0010:  br.s       IL_0012
76     IL_0012:  ldloc.0
77     IL_0013:  ret
78   } // end of method IFoo2::IFoo.Foo
80 } // end of class IFoo2
82 .class interface private abstract auto ansi IFooEx
83        implements IFoo
85   .method public hidebysig newslot virtual final 
86           instance int32  IFoo.Foo(int32 a) cil managed
87   {
88     .override IFoo::Foo
89     // Code size       20 (0x14)
90     .maxstack  2
91     .locals init (int32 V_0)
92     IL_0000:  nop
93     IL_0001:  ldstr      "At IFooEx.Foo"
94     IL_0006:  call       void [mscorlib]System.Console::WriteLine(string)
95     IL_000b:  nop
96     IL_000c:  ldarg.1
97     IL_000d:  ldc.i4.2
98     IL_000e:  add
99     IL_000f:  stloc.0
100     IL_0010:  br.s       IL_0012
102     IL_0012:  ldloc.0
103     IL_0013:  ret
104   } // end of method IFooEx::IFoo.Foo
105 } // end of class IFooEx
107 .class private auto ansi beforefieldinit FooClass
108        extends [mscorlib]System.Object
109        implements IFoo2,
110                   IFoo,
111                   IFooEx
113   .method public hidebysig specialname rtspecialname 
114           instance void  .ctor() cil managed
115   {
116     // Code size       8 (0x8)
117     .maxstack  8
118     IL_0000:  ldarg.0
119     IL_0001:  call       instance void [mscorlib]System.Object::.ctor()
120     IL_0006:  nop
121     IL_0007:  ret
122   } // end of method FooClass::.ctor
124 } // end of class FooClass
126 .class interface private abstract auto ansi I1
128   .method public hidebysig newslot abstract virtual 
129           instance int32  Func(int32 a) cil managed
130   {
131   } // end of method I1::Func
133 } // end of class I1
135 .class interface private abstract auto ansi I2
136        implements I1
138   .method private hidebysig newslot virtual final 
139           instance int32  I1.Func(int32 a) cil managed
140   {
141     .override I1::Func
142     // Code size       20 (0x14)
143     .maxstack  2
144     .locals init (int32 V_0)
145     IL_0000:  nop
146     IL_0001:  ldstr      "At I2.Func"
147     IL_0006:  call       void [mscorlib]System.Console::WriteLine(string)
148     IL_000b:  nop
149     IL_000c:  ldarg.1
150     IL_000d:  ldc.i4.2
151     IL_000e:  add
152     IL_000f:  stloc.0
153     IL_0010:  br.s       IL_0012
155     IL_0012:  ldloc.0
156     IL_0013:  ret
157   } // end of method I2::I1.Func    
158 } // end of class I2
160 .class interface private abstract auto ansi I3
161        implements I1
163   .method private hidebysig newslot virtual final 
164           instance int32  I1.Func(int32 a) cil managed
165   {
166     .override I1::Func
167     // Code size       20 (0x14)
168     .maxstack  2
169     .locals init (int32 V_0)
170     IL_0000:  nop
171     IL_0001:  ldstr      "At I3.Func"
172     IL_0006:  call       void [mscorlib]System.Console::WriteLine(string)
173     IL_000b:  nop
174     IL_000c:  ldarg.1
175     IL_000d:  ldc.i4.3
176     IL_000e:  add
177     IL_000f:  stloc.0
178     IL_0010:  br.s       IL_0012
180     IL_0012:  ldloc.0
181     IL_0013:  ret
182   } // end of method I3::I1.Func    
183 } // end of class I3
185 .class interface private abstract auto ansi I4
186        implements I2,
187                   I1,
188                   I3
190   .method private hidebysig newslot virtual final 
191           instance int32  I1.Func(int32 a) cil managed
192   {
193     .override I1::Func
194     // Code size       20 (0x14)
195     .maxstack  2
196     .locals init (int32 V_0)
197     IL_0000:  nop
198     IL_0001:  ldstr      "At I4.Func"
199     IL_0006:  call       void [mscorlib]System.Console::WriteLine(string)
200     IL_000b:  nop
201     IL_000c:  ldarg.1
202     IL_000d:  ldc.i4.4
203     IL_000e:  add
204     IL_000f:  stloc.0
205     IL_0010:  br.s       IL_0012
207     IL_0012:  ldloc.0
208     IL_0013:  ret
209   } // end of method I4::I1.Func   
210 } // end of class I4
212 .class private auto ansi beforefieldinit I4Class
213        extends [mscorlib]System.Object
214        implements I4,
215                   I2,
216                   I1,
217                   I3
219   .method public hidebysig specialname rtspecialname 
220           instance void  .ctor() cil managed
221   {
222     // Code size       8 (0x8)
223     .maxstack  8
224     IL_0000:  ldarg.0
225     IL_0001:  call       instance void [mscorlib]System.Object::.ctor()
226     IL_0006:  nop
227     IL_0007:  ret
228   } // end of method I4Class::.ctor
230 } // end of class I4Class
232 .class interface private abstract auto ansi I5
233        implements I1
235   .method private hidebysig newslot virtual final 
236           instance int32  I1.Func(int32 a) cil managed
237   {
238     .override I1::Func
239     // Code size       20 (0x14)
240     .maxstack  2
241     .locals init (int32 V_0)
242     IL_0000:  nop
243     IL_0001:  ldstr      "At I5.Func"
244     IL_0006:  call       void [mscorlib]System.Console::WriteLine(string)
245     IL_000b:  nop
246     IL_000c:  ldarg.1
247     IL_000d:  ldc.i4.5
248     IL_000e:  add
249     IL_000f:  stloc.0
250     IL_0010:  br.s       IL_0012
252     IL_0012:  ldloc.0
253     IL_0013:  ret
254   } // end of method I5::I1.Func  
255 } // end of class I5
257 .class interface private abstract auto ansi I6
258        implements I1
260   .method private hidebysig newslot virtual final 
261           instance int32  I1.Func(int32 a) cil managed
262   {
263     .override I1::Func
264     // Code size       20 (0x14)
265     .maxstack  2
266     .locals init (int32 V_0)
267     IL_0000:  nop
268     IL_0001:  ldstr      "At I6.Func"
269     IL_0006:  call       void [mscorlib]System.Console::WriteLine(string)
270     IL_000b:  nop
271     IL_000c:  ldarg.1
272     IL_000d:  ldc.i4.6
273     IL_000e:  add
274     IL_000f:  stloc.0
275     IL_0010:  br.s       IL_0012
277     IL_0012:  ldloc.0
278     IL_0013:  ret
279   } // end of method I6::I1.Func  
280 } // end of class I6
282 .class interface private abstract auto ansi I7
283        implements I5,
284                   I1,
285                   I6
287   .method private hidebysig newslot virtual final 
288           instance int32  I1.Func(int32 a) cil managed
289   {
290     .override I1::Func
291     // Code size       20 (0x14)
292     .maxstack  2
293     .locals init (int32 V_0)
294     IL_0000:  nop
295     IL_0001:  ldstr      "At I7.Func"
296     IL_0006:  call       void [mscorlib]System.Console::WriteLine(string)
297     IL_000b:  nop
298     IL_000c:  ldarg.1
299     IL_000d:  ldc.i4.7
300     IL_000e:  add
301     IL_000f:  stloc.0
302     IL_0010:  br.s       IL_0012
304     IL_0012:  ldloc.0
305     IL_0013:  ret
306   } // end of method I7::I1.Func  
307 } // end of class I7
309 .class interface private abstract auto ansi I8
310        implements I4,
311                   I2,
312                   I1,
313                   I3,
314                   I7,
315                   I5,
316                   I6
318   .method private hidebysig newslot virtual final 
319           instance int32  I1.Func(int32 a) cil managed
320   {
321     .override I1::Func
322     // Code size       20 (0x14)
323     .maxstack  2
324     .locals init (int32 V_0)
325     IL_0000:  nop
326     IL_0001:  ldstr      "At I8.Func"
327     IL_0006:  call       void [mscorlib]System.Console::WriteLine(string)
328     IL_000b:  nop
329     IL_000c:  ldarg.1
330     IL_000d:  ldc.i4.8
331     IL_000e:  add
332     IL_000f:  stloc.0
333     IL_0010:  br.s       IL_0012
335     IL_0012:  ldloc.0
336     IL_0013:  ret
337   } // end of method I8::I1.Func  
338 } // end of class I8
340 .class private auto ansi beforefieldinit I47Class
341        extends [mscorlib]System.Object
342        implements I4,
343                   I2,
344                   I1,
345                   I3,
346                   I7,
347                   I5,
348                   I6
350   .method public hidebysig specialname rtspecialname 
351           instance void  .ctor() cil managed
352   {
353     // Code size       8 (0x8)
354     .maxstack  8
355     IL_0000:  ldarg.0
356     IL_0001:  call       instance void [mscorlib]System.Object::.ctor()
357     IL_0006:  nop
358     IL_0007:  ret
359   } // end of method I47Class::.ctor
361 } // end of class I47Class
363 .class private auto ansi beforefieldinit I8Class
364        extends [mscorlib]System.Object
365        implements I8,
366                   I4,
367                   I2,
368                   I1,
369                   I3,
370                   I7,
371                   I5,
372                   I6 
374   .method public hidebysig specialname rtspecialname 
375           instance void  .ctor() cil managed
376   {
377     // Code size       8 (0x8)
378     .maxstack  8
379     IL_0000:  ldarg.0
380     IL_0001:  call       instance void [mscorlib]System.Object::.ctor()
381     IL_0006:  nop
382     IL_0007:  ret
383   } // end of method I8Class::.ctor
385 } // end of class I8Class  
387 .class interface private abstract auto ansi GI1`1<T>
389   .method public hidebysig newslot abstract virtual 
390           instance int32  Func<S>([out] class [mscorlib]System.Type[]& types) cil managed
391   {
392   } // end of method GI1`1::'GI1<T>.Func' 
394 } // end of class GI1`1
396 .class interface private abstract auto ansi GI2`1<T>
397        implements class GI1`1<!T>
399 .method private hidebysig newslot virtual final 
400           instance int32  'GI1<T>.Func'<S>([out] class [mscorlib]System.Type[]& types) cil managed
401   {
402     .override  method instance int32 class GI1`1<!T>::Func<[1]>(class [mscorlib]System.Type[]&)
403     // Code size       100 (0x64)
404     .maxstack  5
405     .locals init (int32 V_0)
406     IL_0000:  nop
407     IL_0001:  ldc.i4.4
408     IL_0002:  newarr     [mscorlib]System.Object
409     IL_0007:  dup
410     IL_0008:  ldc.i4.0
411     IL_0009:  ldtoken    !T
412     IL_000e:  call       class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
413     IL_0013:  stelem.ref
414     IL_0014:  dup
415     IL_0015:  ldc.i4.1
416     IL_0016:  ldstr      ", "
417     IL_001b:  stelem.ref
418     IL_001c:  dup
419     IL_001d:  ldc.i4.2
420     IL_001e:  ldtoken    !!S
421     IL_0023:  call       class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
422     IL_0028:  stelem.ref
423     IL_0029:  dup
424     IL_002a:  ldc.i4.3
425     IL_002b:  ldstr      ", GI2"
426     IL_0030:  stelem.ref
427     IL_0031:  call       string [mscorlib]System.String::Concat(object[])
428     IL_0036:  call       void [mscorlib]System.Console::WriteLine(string)
429     IL_003b:  nop
430     IL_003c:  ldarg.1
431     IL_003d:  ldc.i4.2
432     IL_003e:  newarr     [mscorlib]System.Type
433     IL_0043:  dup
434     IL_0044:  ldc.i4.0
435     IL_0045:  ldtoken    !T
436     IL_004a:  call       class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
437     IL_004f:  stelem.ref
438     IL_0050:  dup
439     IL_0051:  ldc.i4.1
440     IL_0052:  ldtoken    !!S
441     IL_0057:  call       class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
442     IL_005c:  stelem.ref
443     IL_005d:  stind.ref
444     IL_005e:  ldc.i4.2
445     IL_005f:  stloc.0
446     IL_0060:  br.s       IL_0062
448     IL_0062:  ldloc.0
449     IL_0063:  ret
450   } // end of method G2`1::'GI1<T>.Func' 
451 } // end of class GI2`1
453 .class interface private abstract auto ansi GI3`1<T>
454        implements class GI1`1<!T>
456 .method private hidebysig newslot virtual final 
457           instance int32  'GI1<T>.Func'<S>([out] class [mscorlib]System.Type[]& types) cil managed
458   {
459     .override  method instance int32 class GI1`1<!T>::Func<[1]>(class [mscorlib]System.Type[]&)
460     // Code size       100 (0x64)
461     .maxstack  5
462     .locals init (int32 V_0)
463     IL_0000:  nop
464     IL_0001:  ldc.i4.4
465     IL_0002:  newarr     [mscorlib]System.Object
466     IL_0007:  dup
467     IL_0008:  ldc.i4.0
468     IL_0009:  ldtoken    !T
469     IL_000e:  call       class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
470     IL_0013:  stelem.ref
471     IL_0014:  dup
472     IL_0015:  ldc.i4.1
473     IL_0016:  ldstr      ", "
474     IL_001b:  stelem.ref
475     IL_001c:  dup
476     IL_001d:  ldc.i4.2
477     IL_001e:  ldtoken    !!S
478     IL_0023:  call       class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
479     IL_0028:  stelem.ref
480     IL_0029:  dup
481     IL_002a:  ldc.i4.3
482     IL_002b:  ldstr      ", GI3"
483     IL_0030:  stelem.ref
484     IL_0031:  call       string [mscorlib]System.String::Concat(object[])
485     IL_0036:  call       void [mscorlib]System.Console::WriteLine(string)
486     IL_003b:  nop
487     IL_003c:  ldarg.1
488     IL_003d:  ldc.i4.2
489     IL_003e:  newarr     [mscorlib]System.Type
490     IL_0043:  dup
491     IL_0044:  ldc.i4.0
492     IL_0045:  ldtoken    !T
493     IL_004a:  call       class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
494     IL_004f:  stelem.ref
495     IL_0050:  dup
496     IL_0051:  ldc.i4.1
497     IL_0052:  ldtoken    !!S
498     IL_0057:  call       class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
499     IL_005c:  stelem.ref
500     IL_005d:  stind.ref
501     IL_005e:  ldc.i4.3
502     IL_005f:  stloc.0
503     IL_0060:  br.s       IL_0062
505     IL_0062:  ldloc.0
506     IL_0063:  ret
507   } // end of method GI3`1::'GI1<T>.Func' 
508 } // end of class GI3`1
510 .class interface private abstract auto ansi GI4`1<T>
511        implements class GI2`1<!T>,
512                   class GI1`1<!T>,
513                   class GI3`1<!T>
515  .method private hidebysig newslot virtual final 
516           instance int32  'GI1<T>.Func'<S>([out] class [mscorlib]System.Type[]& types) cil managed
517   {
518     .override  method instance int32 class GI1`1<!T>::Func<[1]>(class [mscorlib]System.Type[]&)
519     // Code size       100 (0x64)
520     .maxstack  5
521     .locals init (int32 V_0)
522     IL_0000:  nop
523     IL_0001:  ldc.i4.4
524     IL_0002:  newarr     [mscorlib]System.Object
525     IL_0007:  dup
526     IL_0008:  ldc.i4.0
527     IL_0009:  ldtoken    !T
528     IL_000e:  call       class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
529     IL_0013:  stelem.ref
530     IL_0014:  dup
531     IL_0015:  ldc.i4.1
532     IL_0016:  ldstr      ", "
533     IL_001b:  stelem.ref
534     IL_001c:  dup
535     IL_001d:  ldc.i4.2
536     IL_001e:  ldtoken    !!S
537     IL_0023:  call       class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
538     IL_0028:  stelem.ref
539     IL_0029:  dup
540     IL_002a:  ldc.i4.3
541     IL_002b:  ldstr      ", GI4"
542     IL_0030:  stelem.ref
543     IL_0031:  call       string [mscorlib]System.String::Concat(object[])
544     IL_0036:  call       void [mscorlib]System.Console::WriteLine(string)
545     IL_003b:  nop
546     IL_003c:  ldarg.1
547     IL_003d:  ldc.i4.2
548     IL_003e:  newarr     [mscorlib]System.Type
549     IL_0043:  dup
550     IL_0044:  ldc.i4.0
551     IL_0045:  ldtoken    !T
552     IL_004a:  call       class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
553     IL_004f:  stelem.ref
554     IL_0050:  dup
555     IL_0051:  ldc.i4.1
556     IL_0052:  ldtoken    !!S
557     IL_0057:  call       class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
558     IL_005c:  stelem.ref
559     IL_005d:  stind.ref
560     IL_005e:  ldc.i4.4
561     IL_005f:  stloc.0
562     IL_0060:  br.s       IL_0062
564     IL_0062:  ldloc.0
565     IL_0063:  ret
566   } // end of method GI4`1::'GI1<T>.Func' 
567 } // end of class GI4`1
569 .class private auto ansi beforefieldinit GI23Class`1<T>
570        extends [mscorlib]System.Object
571        implements class GI2`1<!T>,
572                   class GI1`1<!T>,
573                   class GI3`1<!T>
575   .method public hidebysig specialname rtspecialname 
576           instance void  .ctor() cil managed
577   {
578     // Code size       8 (0x8)
579     .maxstack  8
580     IL_0000:  ldarg.0
581     IL_0001:  call       instance void [mscorlib]System.Object::.ctor()
582     IL_0006:  nop
583     IL_0007:  ret
584   } // end of method GI23Class`1::.ctor
586 } // end of class GI23Class`1
588 .class private auto ansi beforefieldinit GI4Class`1<T>
589        extends [mscorlib]System.Object
590        implements class GI4`1<!T>,
591                   class GI2`1<!T>,
592                   class GI1`1<!T>,
593                   class GI3`1<!T>
595   .method public hidebysig specialname rtspecialname 
596           instance void  .ctor() cil managed
597   {
598     // Code size       8 (0x8)
599     .maxstack  8
600     IL_0000:  ldarg.0
601     IL_0001:  call       instance void [mscorlib]System.Object::.ctor()
602     IL_0006:  nop
603     IL_0007:  ret
604   } // end of method GI4Class`1::.ctor
606 } // end of class GI4Class`1
608 .class private auto ansi beforefieldinit Program
609        extends [mscorlib]System.Object
611   .method public hidebysig static void  Negative() cil managed
612   {
613     // Code size       225 (0xe1)
614     .maxstack  2
615     .locals init (class FooClass V_0,
616              class IFoo V_1,
617              class I47Class V_2,
618              class I1 V_3,
619              class GI23Class`1<object> V_4,
620              class GI1`1<object> V_5,
621              class [mscorlib]System.Exception V_6,
622              class [mscorlib]System.Exception V_7,
623              class [mscorlib]System.Type[] V_8,
624              class [mscorlib]System.Exception V_9)
625     IL_0000:  nop
626     IL_0001:  newobj     instance void FooClass::.ctor()
627     IL_0006:  stloc.0
628     IL_0007:  ldloc.0
629     IL_0008:  stloc.1
630     IL_0009:  ldstr      "Calling IFoo.Foo on Foo - expecting exception."
631     IL_000e:  call       void [mscorlib]System.Console::WriteLine(string)
632     IL_0013:  nop
633     .try
634     {
635       IL_0014:  nop
636       IL_0015:  ldloc.1
637       IL_0016:  ldc.i4.s   10
638       IL_0018:  callvirt   instance int32 IFoo::Foo(int32)
639       IL_001d:  pop
640       IL_001e:  ldc.i4.0
641       IL_001f:  ldstr      "Expecting exception on Foo"
642       IL_0024:  call       void Test::Assert(bool,
643                                              string)
644       IL_0029:  nop
645       IL_002a:  nop
646       IL_002b:  leave.s    IL_004a
648     }  // end .try
649     catch [mscorlib]System.Exception 
650     {
651       IL_002d:  stloc.s    V_6
652       IL_002f:  nop
653       IL_0030:  ldstr      "Exception caught: "
654       IL_0035:  ldloc.s    V_6
655       IL_0037:  callvirt   instance string [mscorlib]System.Object::ToString()
656       IL_003c:  call       string [mscorlib]System.String::Concat(string,
657                                                                   string)
658       IL_0041:  call       void [mscorlib]System.Console::WriteLine(string)
659       IL_0046:  nop
660       IL_0047:  nop
661       IL_0048:  leave.s    IL_004a
663     }  // end handler
664     IL_004a:  newobj     instance void I47Class::.ctor()
665     IL_004f:  stloc.2
666     IL_0050:  ldloc.2
667     IL_0051:  stloc.3
668     IL_0052:  ldstr      "Calling I1.Func on I47Class - expecting exception"
669     IL_0057:  call       void [mscorlib]System.Console::WriteLine(string)
670     IL_005c:  nop
671     .try
672     {
673       IL_005d:  nop
674       IL_005e:  ldloc.3
675       IL_005f:  ldc.i4.s   10
676       IL_0061:  callvirt   instance int32 I1::Func(int32)
677       IL_0066:  pop
678       IL_0067:  ldc.i4.0
679       IL_0068:  ldstr      "Expecting exception on I47Class"
680       IL_006d:  call       void Test::Assert(bool,
681                                              string)
682       IL_0072:  nop
683       IL_0073:  nop
684       IL_0074:  leave.s    IL_0093
686     }  // end .try
687     catch [mscorlib]System.Exception 
688     {
689       IL_0076:  stloc.s    V_7
690       IL_0078:  nop
691       IL_0079:  ldstr      "Exception caught: "
692       IL_007e:  ldloc.s    V_7
693       IL_0080:  callvirt   instance string [mscorlib]System.Object::ToString()
694       IL_0085:  call       string [mscorlib]System.String::Concat(string,
695                                                                   string)
696       IL_008a:  call       void [mscorlib]System.Console::WriteLine(string)
697       IL_008f:  nop
698       IL_0090:  nop
699       IL_0091:  leave.s    IL_0093
701     }  // end handler
702     IL_0093:  newobj     instance void class GI23Class`1<object>::.ctor()
703     IL_0098:  stloc.s    V_4
704     IL_009a:  ldloc.s    V_4
705     IL_009c:  stloc.s    V_5
706     IL_009e:  ldstr      "Calling GI1<T>.Func on GI23Class<S> - expecting ex"
707     + "ception"
708     IL_00a3:  call       void [mscorlib]System.Console::WriteLine(string)
709     IL_00a8:  nop
710     .try
711     {
712       IL_00a9:  nop
713       IL_00aa:  ldloc.s    V_5
714       IL_00ac:  ldloca.s   V_8
715       IL_00ae:  callvirt   instance int32 class GI1`1<object>::Func<string>(class [mscorlib]System.Type[]&)
716       IL_00b3:  pop
717       IL_00b4:  ldc.i4.0
718       IL_00b5:  ldstr      "Expecting exception on GI23Class"
719       IL_00ba:  call       void Test::Assert(bool,
720                                              string)
721       IL_00bf:  nop
722       IL_00c0:  nop
723       IL_00c1:  leave.s    IL_00e0
725     }  // end .try
726     catch [mscorlib]System.Exception 
727     {
728       IL_00c3:  stloc.s    V_9
729       IL_00c5:  nop
730       IL_00c6:  ldstr      "Exception caught: "
731       IL_00cb:  ldloc.s    V_9
732       IL_00cd:  callvirt   instance string [mscorlib]System.Object::ToString()
733       IL_00d2:  call       string [mscorlib]System.String::Concat(string,
734                                                                   string)
735       IL_00d7:  call       void [mscorlib]System.Console::WriteLine(string)
736       IL_00dc:  nop
737       IL_00dd:  nop
738       IL_00de:  leave.s    IL_00e0
740     }  // end handler
741     IL_00e0:  ret 
742   } // end of method Program::Negative
744   .method public hidebysig static void  Positive() cil managed
745   {
746     // Code size       189 (0xbd)
747     .maxstack  2
748     .locals init (class I4Class V_0,
749              class I1 V_1,
750              class I8Class V_2,
751              class GI4Class`1<object> V_3,
752              class [mscorlib]System.Type[] V_4,
753              class GI1`1<object> V_5)
754     IL_0000:  nop
755     IL_0001:  ldstr      "Calling I1.Func on I4Class - expecting I4.Func"
756     IL_0006:  call       void [mscorlib]System.Console::WriteLine(string)
757     IL_000b:  nop
758     IL_000c:  newobj     instance void I4Class::.ctor()
759     IL_0011:  stloc.0
760     IL_0012:  ldloc.0
761     IL_0013:  stloc.1
762     IL_0014:  ldloc.1
763     IL_0015:  ldc.i4.s   10
764     IL_0017:  callvirt   instance int32 I1::Func(int32)
765     IL_001c:  ldc.i4.s   14
766     IL_001e:  ceq
767     IL_0020:  ldstr      "Expecting I1.Func to land on I4.Func"
768     IL_0025:  call       void Test::Assert(bool,
769                                            string)
770     IL_002a:  nop
771     IL_002b:  ldstr      "Calling I1.Func on I8Class - expecting I8.Func"
772     IL_0030:  call       void [mscorlib]System.Console::WriteLine(string)
773     IL_0035:  nop
774     IL_0036:  newobj     instance void I8Class::.ctor()
775     IL_003b:  stloc.2
776     IL_003c:  ldloc.2
777     IL_003d:  stloc.1
778     IL_003e:  ldloc.1
779     IL_003f:  ldc.i4.s   10
780     IL_0041:  callvirt   instance int32 I1::Func(int32)
781     IL_0046:  ldc.i4.s   18
782     IL_0048:  ceq
783     IL_004a:  ldstr      "Expecting I1.Func to land on I8.Func"
784     IL_004f:  call       void Test::Assert(bool,
785                                            string)
786     IL_0054:  nop
787     IL_0055:  ldstr      "Calling GI1.Func on GI4Class<object> - expecting G"
788     + "I4.Func<S>"
789     IL_005a:  call       void [mscorlib]System.Console::WriteLine(string)
790     IL_005f:  nop
791     IL_0060:  newobj     instance void class GI4Class`1<object>::.ctor()
792     IL_0065:  stloc.3
793     IL_0066:  ldloc.3
794     IL_0067:  stloc.s    V_5
795     IL_0069:  ldloc.s    V_5
796     IL_006b:  ldloca.s   V_4
797     IL_006d:  callvirt   instance int32 class GI1`1<object>::Func<string>(class [mscorlib]System.Type[]&)
798     IL_0072:  ldc.i4.4
799     IL_0073:  ceq
800     IL_0075:  ldstr      "Expecting GI1<T>.Func to land on GII4<T>.Func<S>"
801     IL_007a:  call       void Test::Assert(bool,
802                                            string)
803     IL_007f:  nop
804     IL_0080:  ldloc.s    V_4
805     IL_0082:  ldc.i4.0
806     IL_0083:  ldelem.ref
807     IL_0084:  ldtoken    [mscorlib]System.Object
808     IL_0089:  call       class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
809     IL_008e:  call       bool [mscorlib]System.Type::op_Equality(class [mscorlib]System.Type,
810                                                                  class [mscorlib]System.Type)
811     IL_0093:  ldstr      "T must be object"
812     IL_0098:  call       void Test::Assert(bool,
813                                            string)
814     IL_009d:  nop
815     IL_009e:  ldloc.s    V_4
816     IL_00a0:  ldc.i4.1
817     IL_00a1:  ldelem.ref
818     IL_00a2:  ldtoken    [mscorlib]System.String
819     IL_00a7:  call       class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
820     IL_00ac:  call       bool [mscorlib]System.Type::op_Equality(class [mscorlib]System.Type,
821                                                                  class [mscorlib]System.Type)
822     IL_00b1:  ldstr      "S must be string"
823     IL_00b6:  call       void Test::Assert(bool,
824                                            string)
825     IL_00bb:  nop
826     IL_00bc:  ret
827   } // end of method Program::Positive
829   .method public hidebysig static int32  Main() cil managed
830   {
831     .entrypoint
832     // Code size       23 (0x17)
833     .maxstack  1
834     .locals init (int32 V_0)
835     IL_0000:  nop
836     IL_0001:  call       void Program::Negative()
837     IL_0006:  nop
838     IL_0007:  call       void Program::Positive()
839     IL_000c:  nop
840     IL_000d:  call       int32 Test::Ret()
841     IL_0012:  stloc.0
842     IL_0013:  br.s       IL_0015
844     IL_0015:  ldloc.0
845     IL_0016:  ret
846   } // end of method Program::Main
848   .method public hidebysig specialname rtspecialname 
849           instance void  .ctor() cil managed
850   {
851     // Code size       8 (0x8)
852     .maxstack  8
853     IL_0000:  ldarg.0
854     IL_0001:  call       instance void [mscorlib]System.Object::.ctor()
855     IL_0006:  nop
856     IL_0007:  ret
857   } // end of method Program::.ctor
859 } // end of class Program
861 .class private auto ansi beforefieldinit Test
862        extends [mscorlib]System.Object
864   .field private static bool Pass
865   .method public hidebysig static int32  Ret() cil managed
866   {
867     // Code size       19 (0x13)
868     .maxstack  1
869     .locals init (int32 V_0)
870     IL_0000:  nop
871     IL_0001:  ldsfld     bool Test::Pass
872     IL_0006:  brtrue.s   IL_000c
874     IL_0008:  ldc.i4.s   101
875     IL_000a:  br.s       IL_000e
877     IL_000c:  ldc.i4.s   0
878     IL_000e:  stloc.0
879     IL_000f:  br.s       IL_0011
881     IL_0011:  ldloc.0
882     IL_0012:  ret
883   } // end of method Test::Ret
885   .method public hidebysig static void  Assert(bool cond,
886                                                string msg) cil managed
887   {
888     // Code size       47 (0x2f)
889     .maxstack  2
890     .locals init (bool V_0)
891     IL_0000:  nop
892     IL_0001:  ldarg.0
893     IL_0002:  stloc.0
894     IL_0003:  ldloc.0
895     IL_0004:  brfalse.s  IL_0015
897     IL_0006:  nop
898     IL_0007:  ldstr      "PASS"
899     IL_000c:  call       void [mscorlib]System.Console::WriteLine(string)
900     IL_0011:  nop
901     IL_0012:  nop
902     IL_0013:  br.s       IL_002e
904     IL_0015:  nop
905     IL_0016:  ldstr      "FAIL: "
906     IL_001b:  ldarg.1
907     IL_001c:  call       string [mscorlib]System.String::Concat(string,
908                                                                 string)
909     IL_0021:  call       void [mscorlib]System.Console::WriteLine(string)
910     IL_0026:  nop
911     IL_0027:  ldc.i4.0
912     IL_0028:  stsfld     bool Test::Pass
913     IL_002d:  nop
914     IL_002e:  ret
915   } // end of method Test::Assert
917   .method public hidebysig specialname rtspecialname 
918           instance void  .ctor() cil managed
919   {
920     // Code size       8 (0x8)
921     .maxstack  8
922     IL_0000:  ldarg.0
923     IL_0001:  call       instance void [mscorlib]System.Object::.ctor()
924     IL_0006:  nop
925     IL_0007:  ret
926   } // end of method Test::.ctor
928   .method private hidebysig specialname rtspecialname static 
929           void  .cctor() cil managed
930   {
931     // Code size       7 (0x7)
932     .maxstack  8
933     IL_0000:  ldc.i4.1
934     IL_0001:  stsfld     bool Test::Pass
935     IL_0006:  ret
936   } // end of method Test::.cctor
938 } // end of class Test
941 // =============================================================
943 // *********** DISASSEMBLY COMPLETE ***********************
944 // WARNING: Created Win32 resource file diamondshape.res