a575963da9
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
25 lines
327 B
C#
25 lines
327 B
C#
// 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;
|
|
}
|
|
} |