Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cs1651.cs « errors « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a3d52e575fa228460b777388be8596da567bef17 (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
// cs1651.cs: Members of readonly static field 'B.a' cannot be passed ref or out (except in a constructor)
// Line: 23

class B
{
	public struct A
	{
	    public int val;
	}

	public static readonly A a = new A ();
}

class C
{
    static void f (ref int i)
    {
	i = 44;
    }

    static void Main ()
    {
	f (ref B.a.val);
    }
}