summaryrefslogtreecommitdiff
path: root/mcs/tests/test-821.cs
blob: cef7b42fdb6ed3e1b25c762f26915196b320194c (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
// Compiler options: -unsafe

unsafe struct S
{
	T Test<T> ()
	{
		return default (T);
	}

	public void M ()
	{
		fixed (S* ptr = &this)
			ptr->Test<string> ();
	}
}

class A
{
	public static int Main ()
	{
		new S ().M ();
		return 0;
	}
}