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

25 lines
317 B
C#

// CS0266: Cannot implicitly convert type `B' to `I'. An explicit conversion exists (are you missing a cast?)
// Line: 21
interface I { }
class A : I { }
class B
{
public static explicit operator A (B from)
{
return new A ();
}
}
class App
{
public static void Main ()
{
B b = new B ();
I i = b;
}
}