summaryrefslogtreecommitdiff
path: root/mcs/errors/cs1113-2.cs
blob: 5043b34db45315d18b5023bc6553f896ba75370d (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
// CS1113: Extension method `Extension.Foo(this S)' of value type `S' cannot be used to create delegates
// Line: 11

delegate void D ();

public class C
{
	static void Main ()
	{
		S s = new S ();
		D d = s.Foo;
	}
}

public struct S
{
	public void Foo (int i)
	{
	}
}

public static class Extension
{
	public static void Foo (this S s) { }
}