summaryrefslogtreecommitdiff
path: root/mcs/errors/cs0315-3.cs
blob: 80ab3db11557a2c8900cc2bfb2d20df918fe1754 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// CS0315: The type `int' cannot be used as type parameter `U' in the generic type or method `A<int?>.Test<U>()'. There is no boxing conversion from `int' to `int?'
// Line: 19

class A<T>
{
	public static void Test<U> () where U : T
	{
	}
}

class B : A<int?>
{
}

class Program
{
	public static void Main ()
	{
		B.Test<int> ();
	}
}