summaryrefslogtreecommitdiff
path: root/mcs/errors/cs1650-3.cs
blob: e0cfa0c6ef0acb960b32917f9cb22353860130f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// CS1650: Fields of static readonly field `C<T>.t' cannot be assigned to (except in a static constructor or a variable initializer)
// Line: 17

using System;

interface I
{
	int X { get; set; }
}

class C<T> where T : struct, I
{
	static readonly T t;

	public static void Foo ()
	{
		t.X = 42;
	}
}