Преглед изворни кода

New test.

svn path=/trunk/mcs/; revision=103281
Marek Safar пре 17 година
родитељ
комит
8ade83c0c8
1 измењених фајлова са 25 додато и 0 уклоњено
  1. 25 0
      mcs/errors/gcs0121-2.cs

+ 25 - 0
mcs/errors/gcs0121-2.cs

@@ -0,0 +1,25 @@
+// CS0121: The call is ambiguous between the following methods or properties: `Test.Foo<int,int>(in int, System.Linq.Expressions.Expression<System.Func<int,int>>)' and `Test.Foo<int,int>(in 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);
+	}
+}
+