Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

33 lines
407 B
C#

// CS0457: Ambiguous user defined operators `D.implicit operator A(D)' and `C.implicit operator B(C)' when converting from `D' to `B'
// Line: 30
class A
{
}
class B : A
{
}
class C
{
public static implicit operator B (C s)
{
return new B ();
}
}
class D : C
{
public static implicit operator A (D s)
{
return new B ();
}
public static void Main ()
{
D d = new D ();
B b2 = (B) d;
}
}