fe777c5c82
Former-commit-id: 6a76a29bd07d86e57c6c8da45c65ed5447d38a61
28 lines
432 B
C#
28 lines
432 B
C#
// CS0457: Ambiguous user defined operators `D.implicit operator D(System.Action)' and `D.explicit operator D(Foo)' when converting from `method group' to `D'
|
|
// Line: 25
|
|
|
|
using System;
|
|
|
|
public delegate void Foo ();
|
|
|
|
class D
|
|
{
|
|
public static implicit operator D (Action d)
|
|
{
|
|
return new D ();
|
|
}
|
|
|
|
public static explicit operator D (Foo d)
|
|
{
|
|
return new D ();
|
|
}
|
|
}
|
|
|
|
class Program
|
|
{
|
|
static void Main()
|
|
{
|
|
D d = (D) Main;
|
|
}
|
|
}
|