Merge pull request #2377 from joelmartinez/docs-multiassembly-extension-fix
[mono.git] / mono / tests / verifier / invalid_non_empty_stack_at_try_begin.il
1
2 // invalid CIL which breaks the ECMA-335 rules. 
3 // this CIL should fail verification by a conforming CLI verifier.
4
5 .assembly 'invalid_non_empty_stack_at_try_begin'
6 {
7   .hash algorithm 0x00008004
8   .ver  0:0:0:0
9 }
10
11 .class ClassA
12         extends [mscorlib]System.Object
13 {
14 }
15
16 .class sealed MyValueType
17         extends [mscorlib]System.ValueType
18 {
19         .field private int32 v
20 }
21
22 .class public Template`1<T>
23         extends [mscorlib]System.Object
24 {
25 }
26
27 .class sealed public ValueTypeTemplate`1<T>
28         extends [mscorlib]System.ValueType
29 {
30         .field private int32 v
31 }
32
33 .method public static int32 Main() cil managed
34 {
35         .entrypoint
36         .maxstack 8
37         .locals init (object _XO, int32 _X1)
38  
39         nop
40         ldloc.1
41         
42         .try {
43                 pop
44                 newobj instance void class [mscorlib]System.Exception::.ctor()
45                 throw
46                 nop
47                 leave END
48         } catch [mscorlib]System.Exception {
49                 stloc.0
50                 nop
51                 nop
52                 leave END
53         }
54
55 END:
56         ldc.i4.0
57         ret
58 }