Merge pull request #5675 from mono/glib-debug-symbols
[mono.git] / mcs / errors / cs0457-4.cs
1 // CS0457: Ambiguous user defined operators `D.implicit operator D(System.Action)' and `D.explicit operator D(Foo)' when converting from `method group' to `D'
2 // Line: 25
3
4 using System;
5
6 public delegate void Foo ();
7
8 class D
9 {
10         public static implicit operator D (Action d)
11         {
12                 return new D ();
13         }
14
15         public static explicit operator D (Foo d)
16         {
17                 return new D ();
18         }
19 }
20
21 class Program
22 {
23         static void Main()
24         {
25                 D d = (D) Main;
26         }
27 }