summaryrefslogtreecommitdiff
path: root/mcs/errors/cs0121-17.cs
blob: a537f3190497df236e56f5d894049ecf66467588 (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
// CS0121: The call is ambiguous between the following methods or properties: `Test.Foo<int,int>(int, System.Linq.Expressions.Expression<System.Func<int,int>>)' and `Test.Foo<int,int>(int, System.Func<int,int>)'
// Line: 22

using System;
using System.Linq;
using System.Linq.Expressions;

class Test
{
	static int Foo<T, R> (T t, Expression<Func<T, R>> e)
	{
		return 5;
	}
	
	static int Foo<T, R> (T t, Func<T, R> e)
	{
		return 0;
	}

	static void Main ()
	{
		Foo (1, i => i);
	}
}