Add new tests.
authorMarek Safar <marek.safar@gmail.com>
Fri, 22 Jun 2007 12:35:05 +0000 (12:35 -0000)
committerMarek Safar <marek.safar@gmail.com>
Fri, 22 Jun 2007 12:35:05 +0000 (12:35 -0000)
svn path=/trunk/mcs/; revision=80546

mcs/errors/gcs0037.cs [new file with mode: 0644]
mcs/errors/gcs0825.cs [new file with mode: 0644]
mcs/errors/gcs0826-2.cs [new file with mode: 0644]
mcs/errors/gcs0826-3.cs [new file with mode: 0644]
mcs/errors/gcs0826-4.cs [new file with mode: 0644]
mcs/errors/gcs0826-5.cs [new file with mode: 0644]
mcs/errors/gcs0826.cs [new file with mode: 0644]

diff --git a/mcs/errors/gcs0037.cs b/mcs/errors/gcs0037.cs
new file mode 100644 (file)
index 0000000..9e968e7
--- /dev/null
@@ -0,0 +1,12 @@
+// CS0037: Cannot convert null to `int' because it is a value type
+// Line: 9
+// Compiler options: -langversion:linq
+
+public class Test
+{
+       static void Main ()
+       {
+               var e = new[] { 1, null };
+       }
+}
+
diff --git a/mcs/errors/gcs0825.cs b/mcs/errors/gcs0825.cs
new file mode 100644 (file)
index 0000000..8d0212d
--- /dev/null
@@ -0,0 +1,9 @@
+// CS0825: The contextual keyword `var' may only appear within a local variable declaration
+// Line: 9
+// Compiler options: -langversion:linq
+
+public class Test
+{
+       var v = "a";
+}
+
diff --git a/mcs/errors/gcs0826-2.cs b/mcs/errors/gcs0826-2.cs
new file mode 100644 (file)
index 0000000..32af7d4
--- /dev/null
@@ -0,0 +1,12 @@
+// CS0826: The type of an implicitly typed array cannot be inferred from the initializer. Try specifying array type explicitly
+// Line: 9
+// Compiler options: -langversion:linq
+
+public class Test
+{
+       static void Main ()
+       {
+               var e = new[] { null };
+       }
+}
+
diff --git a/mcs/errors/gcs0826-3.cs b/mcs/errors/gcs0826-3.cs
new file mode 100644 (file)
index 0000000..6484cbb
--- /dev/null
@@ -0,0 +1,16 @@
+// CS0826: The type of an implicitly typed array cannot be inferred from the initializer. Try specifying array type explicitly
+// Line: 13
+// Compiler options: -langversion:linq
+
+public class Test
+{
+       static void TestMethod ()
+       {
+       }
+       
+       static void Main ()
+       {
+               var e = new[] { TestMethod () };
+       }
+}
+
diff --git a/mcs/errors/gcs0826-4.cs b/mcs/errors/gcs0826-4.cs
new file mode 100644 (file)
index 0000000..8168126
--- /dev/null
@@ -0,0 +1,12 @@
+// CS0826: The type of an implicitly typed array cannot be inferred from the initializer. Try specifying array type explicitly
+// Line: 9
+// Compiler options: -langversion:linq
+
+public class Test
+{
+       static void Main ()
+       {
+               var e = new[,,,] { 1, 2 }; 
+       }
+}
+
diff --git a/mcs/errors/gcs0826-5.cs b/mcs/errors/gcs0826-5.cs
new file mode 100644 (file)
index 0000000..dd6a3e5
--- /dev/null
@@ -0,0 +1,12 @@
+// CS0826: The type of an implicitly typed array cannot be inferred from the initializer. Try specifying array type explicitly
+// Line: 9
+// Compiler options: -langversion:linq
+
+public class Test
+{
+       static void Main ()
+       {
+               var e = new[] { delegate {} };
+       }
+}
+
diff --git a/mcs/errors/gcs0826.cs b/mcs/errors/gcs0826.cs
new file mode 100644 (file)
index 0000000..8a84860
--- /dev/null
@@ -0,0 +1,12 @@
+// CS0826: The type of an implicitly typed array cannot be inferred from the initializer. Try specifying array type explicitly
+// Line: 9
+// Compiler options: -langversion:linq
+
+public class Test
+{
+       static void Main ()
+       {
+               var e = new[] { };
+       }
+}
+