blob: bdf1e135ac80685c26f840926ac1b8f57f20d1d1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
//
// This test is used to make sure that we correctly create value
// types in the presence of arrays. Check bug 21801 for a history
// of the bug
//
using System;
struct X {
int value;
X (int a)
{
value = a;
}
static X F (int a)
{
return new X (a);
}
public static int Main ()
{
X [] x = { new X (40), F (10) };
if (x [0].value != 40)
return 1;
if (x [1].value != 10)
return 2;
Console.WriteLine ("test ok");
return 0;
}
}
|