Merge pull request #3563 from lewurm/interpreter
[mono.git] / mcs / tests / test-89.cs
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;
7
8 struct X {
9         int value;
10         
11         X (int a)
12         {
13                 value = a;
14         }
15
16         static X F (int a)
17         {
18                 return new X (a);
19         }
20         
21         public static int Main ()
22         {
23                 X [] x = { new X (40), F (10) };
24
25                 if (x [0].value != 40)
26                         return 1;
27
28                 if (x [1].value != 10)
29                         return 2;
30
31                 Console.WriteLine ("test ok");
32                 return 0;
33         }
34 }