[mcs] Consider method candidates with misplaced named arguments not applicable. Fixes...
[mono.git] / mcs / errors / cs0313-2.cs
1 // CS0313: The type `S?' cannot be used as type parameter `T' in the generic type or method `C<I>.Foo<T>(T)'. The nullable type `S?' never satisfies interface constraint `I'
2 // Line: 20
3
4 struct S : I
5 {
6 }
7
8 interface I
9 {
10 }
11
12 class C<U>
13 {
14         static void Foo<T> (T value) where T : U
15         {
16         }
17
18         static void Bar (S? s)
19         {
20                 C<I>.Foo (s);
21         }
22 }