blob: acc6444509963e3aa63bd08e230e708394ef26ed (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
// CS0121: The call is ambiguous between the following methods or properties: `A.Foo<int>(int, G<int>)' and `A.Foo<int>(int, object)'
// Line: 18
class A
{
static int Foo<T> (T a, G<T> y = null)
{
return 1;
}
static int Foo<T> (T a, object y = null)
{
return 2;
}
public static int Main ()
{
if (A.Foo<int> (99) != 2)
return 1;
return 0;
}
}
class G<U>
{
}
|