summaryrefslogtreecommitdiff
path: root/mcs/errors/cs0121-26.cs
blob: e0c76a5e724889d158b7bff09f72b667ef56614a (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// CS0121: The call is ambiguous between the following methods or properties: `A.B.X.Test(this int)' and `A.C.X.Test(this int)'
// Line: 37

using System;

namespace A.B
{
	static class X
	{
		public static int Test (this int o)
		{
			return 1;
		}
	}
}

namespace A.C
{
	static class X
	{
		public static int Test (this int o)
		{
			return 2;
		}
	}
}

namespace C
{
	using A.B;
	using static A.C.X;

	class M
	{
		public static int Main ()
		{
			if (1.Test () != 1)
				return 1;

			return 0;
		}
	}
}