1 // Test that no duplicate TypeSpec entries are emitted
3 // Multiple instaces of generic type class g<T>, with the same
4 // argument (int32). Only one typespec should be emitted and shared by all these.
6 .assembly extern mscorlib
10 .assembly 'gen-array-1'
12 .custom instance void class [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = (
13 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx
14 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows.
20 .class private auto ansi beforefieldinit g`1<T>
21 extends [mscorlib]System.Object
23 .method public hidebysig specialname rtspecialname
24 instance default void .ctor () cil managed
28 IL_0001: call instance void object::.ctor()
33 .class private auto ansi beforefieldinit test
34 extends [mscorlib]System.Object
36 .method public static hidebysig
37 default void Main () cil managed
42 /* Multiple generic instances with same argument */
43 class g`1<int32>[] V_0,
44 class g`1<int32>[][] V_1,
46 class g`1<int32>[] V_3,
47 class g`1<class g`1<int32>> V_4,
48 class g`1<class g`1<int32>>[] V_5,
49 class g`1<class g`1<int32>>[][] V_6,
50 class g`1<class g`1<int32>[]>[][] V_7,
51 class g`1<class g`1<int32>[][]>[][] V_8)
52 IL_0000: ldc.i4.s 0x36
53 IL_0002: newarr class g`1<int32>
57 IL_000a: newobj instance void class g`1<int32>::.ctor()