blob: d6ebe8e34db5c8108f2260a30b4e22b6169b906e (
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
|
// CS0034: Operator `==' is ambiguous on operands of type `Foo' and `Foo'
// Line: 23
public struct Foo
{
public static implicit operator int? (Foo f)
{
return 1;
}
public static implicit operator bool? (Foo f)
{
return false;
}
}
class C
{
public static void Main ()
{
Foo f;
Foo f2;
var v = f == f2;
}
}
|