Xamarin Public Jenkins (auto-signing) e46a49ecf1 Imported Upstream version 5.10.0.47
Former-commit-id: d0813289fa2d35e1f8ed77530acb4fb1df441bc0
2018-01-24 17:04:36 +00:00

45 lines
462 B
C#

class X
{
int field;
public static int Main ()
{
var x = new X ();
x.field = 5;
if (!x.Test1 ())
return 1;
x.Test2 ();
if (x.Test3 ()++ != 6)
return 2;
if (x.field != 7)
return 3;
return 0;
}
bool Test1 ()
{
ref var x = ref field;
int v = x;
++x;
return x == 6;
}
void Test2 ()
{
ref int x = ref field;
x.ToString ();
}
ref int Test3 ()
{
ref int l = ref field;
ref int v = ref l;
return ref l;
}
}