summaryrefslogtreecommitdiff
path: root/mcs/errors/cs0214-9.cs
blob: f80a80ea32674d58ea4d9ffe776121533f5f6cec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// CS214: Pointers and fixed size buffers may only be used in an unsafe context
// Line: 21
// Compiler options: -unsafe

public unsafe delegate int* Bar ();

class X
{
	unsafe static int* Test ()
	{
		return null;
	}

	static void Main ()
	{
		Bar b;
		unsafe {
			b = Test;
		}
		
		b ();
	}
}