summaryrefslogtreecommitdiff
path: root/mcs/tests/dtest-028.cs
blob: 94c33799bde4a0103b2ab7a0eb1fa95db602a442 (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
35
36
37
38
39
class C
{
	public void MethodRef (ref int a)
	{
		a += 10;
	}
	
	public void MethodOut (out ushort a)
	{
		a = 40;
	}
}

public class Test
{
	static void M (ref dynamic[] d, ref object[] o)
	{
	}
	
	public static int Main ()
	{
		dynamic d = new C ();
		int i = 1;
		
		d.MethodRef (ref i);
		if (i != 11)
			return 1;

		ushort u = 9;
		d.MethodOut (out u);
		if (u != 40)
			return 2;
		
		object[] o = null;
		M (ref o, ref o);
		
		return 0;
	}
}