1 // Licensed to the .NET Foundation under one or more agreements.
2 // The .NET Foundation licenses this file to you under the MIT license.
3 // See the LICENSE file in the project root for more information.
5 .assembly extern mscorlib{}
6 .assembly extern types{}
8 .assembly Method_ClassConstraint_Neg {}
12 .class public auto ansi beforefieldinit B
13 extends [mscorlib]System.Object
16 // Generic method with class() constraint
17 .method public hidebysig instance void
18 method1<class T>() cil managed
24 .method public hidebysig specialname rtspecialname
25 instance void .ctor() cil managed
29 call instance void [mscorlib]System.Object::.ctor()
34 .class public auto ansi beforefieldinit M_ClassConstraint
35 extends [mscorlib]System.Object
39 // generic argument is a struct
40 .method public hidebysig static void Test3() cil managed
44 newobj instance void class B::.ctor()
45 call instance void class B::method1<valuetype [types]NonGenStruct>()
51 // generic argument is an enum with no default ctor
52 .method public hidebysig static void Test8() cil managed
56 newobj instance void class B::.ctor()
57 call instance void class B::method1<valuetype [types]Enum1>()
63 .class public auto ansi beforefieldinit M_ClassConstraintGenTypes
64 extends [mscorlib]System.Object
68 // generic argument is a struct
69 .method public hidebysig static void Test3() cil managed
73 newobj instance void class B::.ctor()
74 call instance void class B::method1<valuetype [types]GenStruct<int32>>()
80 // generic argument is NUllable<T>
81 .method public hidebysig static void Test6() cil managed
85 newobj instance void class B::.ctor()
86 call instance void class B::method1<valuetype [mscorlib]System.'Nullable`1'<int32>>()