Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cs0312.cs « errors « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 431818ff98415d9e7c64131d242a7b66e0f41b39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// CS0312: The type `S?' cannot be used as type parameter `T' in the generic type or method `C<S>.Foo<T>(T)'. The nullable type `S?' does not satisfy constraint `S'
// Line: 16

struct S
{
}

class C<U>
{
	static void Foo<T> (T value) where T : U
	{
	}

	static void Test (S? s)
	{
		C<S>.Foo (s);
	}
}