summaryrefslogtreecommitdiff
path: root/mcs/tests/test-742.cs
blob: 8be9f8220c0f6e453b79892bc096ddc794f23dbe (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
using System;

public struct Test
{
	public int Foo;

	public static Test Set (C c)
	{
		c.Value.Foo = 21;
		return c.Value;
	}
}

public class C
{
	public Test Value;
}
public class Driver
{
	public static int Main ()
	{
		var v = Test.Set (new C ());
		Console.WriteLine (v.Foo);
		if (v.Foo != 21)
			return 1;
		return 0;
	}
}