New tests
authorMarek Safar <marek.safar@gmail.com>
Wed, 7 Sep 2011 10:41:21 +0000 (11:41 +0100)
committerMarek Safar <marek.safar@gmail.com>
Wed, 7 Sep 2011 15:38:43 +0000 (16:38 +0100)
mcs/errors/cs0177-10.cs [new file with mode: 0644]
mcs/tests/test-iter-25.cs [new file with mode: 0644]

diff --git a/mcs/errors/cs0177-10.cs b/mcs/errors/cs0177-10.cs
new file mode 100644 (file)
index 0000000..000f803
--- /dev/null
@@ -0,0 +1,16 @@
+// CS0177: The out parameter `output' must be assigned to before control leaves the current method
+// Line: 8
+
+class Test
+{
+       static bool TryAction<T> (out T output)
+       {
+               return false;
+       }
+
+       static void Main ()
+       {
+               Test value;
+               TryAction<Test> (out value);
+       }
+}
diff --git a/mcs/tests/test-iter-25.cs b/mcs/tests/test-iter-25.cs
new file mode 100644 (file)
index 0000000..b795c98
--- /dev/null
@@ -0,0 +1,42 @@
+using System;
+using System.Collections.Generic;
+
+public class D : IDisposable
+{
+       public D (string bar)
+       {
+       }
+
+       public void Dispose ()
+       {
+       }
+}
+
+public class UploadAction
+{
+       public static void RunOnThread (Action a)
+       {
+               a.Invoke ();
+       }
+
+       public static IEnumerable<object> TagsError ()
+       {
+               string tags;
+               tags = "";
+
+               RunOnThread (() => {
+                       using (D u = new D (tags)) {
+                               Console.WriteLine ("No Op");
+                       }
+               });
+
+               yield break;
+       }
+
+       static void Main ()
+       {
+               foreach (object bar in TagsError ()) {
+                       Console.WriteLine ("No op {0}", bar);
+               }
+       }
+}