blob: 13ac1b3c80ab0347df02b80aa7aae343e5c8cd57 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
// CS0313: The type `S?' cannot be used as type parameter `T' in the generic type or method `S.Foo<T>(T)'. The nullable type `S?' never satisfies interface constraint `I'
// Line: 16
interface I
{
}
struct S : I
{
static void Foo<T> (T t) where T : I
{
}
static void Test (S? s)
{
Foo (s);
}
}
|