Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2008-08-11 17:16:08 +0400
committerMarek Safar <marek.safar@gmail.com>2008-08-11 17:16:08 +0400
commit88db482f051919ad7d2237e8e7a31bdcc1fbc2ab (patch)
tree587df075082afc1b954b7d12c4505a62cb051b74
parent0dec9096c8534a966814c03dfabcb7995900904a (diff)
New tests.
svn path=/trunk/mcs/; revision=110104
-rwxr-xr-xmcs/errors/cs0121-3.cs23
-rwxr-xr-xmcs/errors/cs0316.cs9
-rwxr-xr-xmcs/errors/gcs0100.cs12
-rwxr-xr-xmcs/errors/gcs0411-10.cs16
-rwxr-xr-xmcs/errors/gcs0411-3.cs14
5 files changed, 74 insertions, 0 deletions
diff --git a/mcs/errors/cs0121-3.cs b/mcs/errors/cs0121-3.cs
new file mode 100755
index 00000000000..0ecedd64a51
--- /dev/null
+++ b/mcs/errors/cs0121-3.cs
@@ -0,0 +1,23 @@
+// CS0121: The call is ambiguous between the following methods or properties: `B.operator +(A, B)' and `A.operator +(A, B)'
+// Line: 21
+
+class A
+{
+ public static A operator + (A a, B b)
+ {
+ return null;
+ }
+}
+
+class B
+{
+ public static A operator + (A a, B b)
+ {
+ return null;
+ }
+
+ static void Main ()
+ {
+ object o = new A () + new B ();
+ }
+}
diff --git a/mcs/errors/cs0316.cs b/mcs/errors/cs0316.cs
new file mode 100755
index 00000000000..d537efaecea
--- /dev/null
+++ b/mcs/errors/cs0316.cs
@@ -0,0 +1,9 @@
+// CS0316: The parameter name `value' conflicts with a compiler generated name
+// Line: 6
+
+class C
+{
+ int this [string value] {
+ set { }
+ }
+}
diff --git a/mcs/errors/gcs0100.cs b/mcs/errors/gcs0100.cs
new file mode 100755
index 00000000000..5a7f1d168d4
--- /dev/null
+++ b/mcs/errors/gcs0100.cs
@@ -0,0 +1,12 @@
+// CS0100: The parameter name `a' is a duplicate
+// Line: 10
+
+using System;
+
+class C
+{
+ static void Main ()
+ {
+ Func<int, int, int> l = (a, a) => 1;
+ }
+}
diff --git a/mcs/errors/gcs0411-10.cs b/mcs/errors/gcs0411-10.cs
new file mode 100755
index 00000000000..fe7f3ecfb95
--- /dev/null
+++ b/mcs/errors/gcs0411-10.cs
@@ -0,0 +1,16 @@
+// CS0411: The type arguments for method `C.Foo<T>(T)' cannot be inferred from the usage. Try specifying the type arguments explicitly
+// Line: 14
+// Compiler options: -unsafe
+
+class C
+{
+ static void Foo<T> (T t)
+ {
+ }
+
+ unsafe static void Test ()
+ {
+ int* i = null;
+ Foo (i);
+ }
+}
diff --git a/mcs/errors/gcs0411-3.cs b/mcs/errors/gcs0411-3.cs
new file mode 100755
index 00000000000..04c2de60ba9
--- /dev/null
+++ b/mcs/errors/gcs0411-3.cs
@@ -0,0 +1,14 @@
+// CS0411: The type arguments for method `C.Foo<T>(T)' cannot be inferred from the usage. Try specifying the type arguments explicitly
+// Line: 12
+
+class C
+{
+ static void X ()
+ {
+ }
+
+ static void Foo<T> (T t)
+ {
+ Foo(X ());
+ }
+}