linux-packaging-mono/mcs/tests/gtest-initialize-14.cs
Xamarin Public Jenkins 6992685b86 Imported Upstream version 4.2.0.179
Former-commit-id: 0a113cb3a6feb7873f632839b1307cc6033cd595
2015-11-10 14:54:39 +00:00

36 lines
335 B
C#

using System;
struct S
{
public int X, Y;
}
class X
{
public static int Main ()
{
var rect = new S {
X = 1,
Y = 2,
};
if (rect.X != 1)
return 1;
if (rect.Y != 2)
return 2;
rect = new S {
X = rect.X,
Y = rect.Y,
};
if (rect.X != 1)
return 3;
if (rect.Y != 2)
return 4;
return 0;
}
}