blob: 36dc16aea0f831d239f71f1a891c7031cc6812da (
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
28
29
30
|
// CS1956: The interface method `I<string>.M(out string)' implementation is ambiguous between following methods: `A<string,string>.M(out string)' and `A<string,string>.M(ref string)' in type `Test'
// Line: 17
// Compiler options: -warnaserror
interface I<T>
{
void M (out T x);
}
class A<T, U>
{
public virtual void M (out T t)
{
t = default (T);
}
public virtual void M (ref U u)
{
}
}
class Test : A<string, string>, I<string>
{
static void Main ()
{
I<string> x = new Test ();
string s;
x.M (out y);
}
}
|