Instantiate generic types so we don't get null pointers
[mono.git] / mcs / ilasm / tests / generics-c.il
1 //
2 // Test a generic type type param field
3 //
4
5 .assembly extern mscorlib { }
6
7
8 .namespace Mono.ILASM.Tests {
9
10            .class public Set<T> extends [mscorlib]System.Object {
11
12                   .field public !0 val
13
14            }
15
16            .class public Driver extends [mscorlib]System.Object {
17
18                   .method public static void Main ()
19                   {
20                         .entrypoint
21                         .locals init (class Mono.ILASM.Tests.Set<int32>)
22
23                         newobj instance void class Mono.ILASM.Tests.Set<int32>::.ctor ()
24                         stloc.0
25                         
26                         ldloc.0
27                         ldc.i4.1
28                         stfld int32 class Mono.ILASM.Tests.Set<int32>::val
29
30                         ldfld int32 class Mono.ILASM.Tests.Set<int32>::val
31                         call void [mscorlib]System.Console::WriteLine (int32)
32
33                         ret
34                   }
35
36            }
37 }
38