[LoongArch64] Part-5:add loongarch support in some files for LoongArch64. (#21769)
[mono-project.git] / mcs / tests / test-89.cs
blobbdf1e135ac80685c26f840926ac1b8f57f20d1d1
1 //
2 // This test is used to make sure that we correctly create value
3 // types in the presence of arrays. Check bug 21801 for a history
4 // of the bug
5 //
6 using System;
8 struct X {
9 int value;
11 X (int a)
13 value = a;
16 static X F (int a)
18 return new X (a);
21 public static int Main ()
23 X [] x = { new X (40), F (10) };
25 if (x [0].value != 40)
26 return 1;
28 if (x [1].value != 10)
29 return 2;
31 Console.WriteLine ("test ok");
32 return 0;