Browse Source

New test.

svn path=/trunk/mcs/; revision=135284
Marek Safar 16 years ago
parent
commit
da9bc59642
1 changed files with 27 additions and 0 deletions
  1. 27 0
      mcs/errors/gcs0121-3.cs

+ 27 - 0
mcs/errors/gcs0121-3.cs

@@ -0,0 +1,27 @@
+// CS0122: The call is ambiguous between the following methods or properties: `Test.Foo(IIn<string>)' and `Test.Foo(IIn<Test>)'
+// Line: 23
+// Compiler options: -langversion:future
+
+interface IIn<in T>
+{
+}
+
+class Test
+{
+
+	static void Foo (IIn<string> f)
+	{
+	}
+
+	static void Foo (IIn<Test> f)
+	{
+	}
+
+	public static int Main ()
+	{
+		IIn<object> test = null;
+		Foo (test);
+
+		return 0;
+	}
+}