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

37 lines
432 B
C#

struct R
{
public static bool operator < (R left, R right)
{
return true;
}
public static bool operator > (R left, R right)
{
return false;
}
public static implicit operator float(R r)
{
return 5;
}
public static implicit operator R(float f)
{
return new R ();
}
}
class C
{
public static int Main ()
{
var r = new R ();
float f = 999f;
bool b = f < r;
if (!b)
return 1;
return 0;
}
}