New test.
authorMarek Safar <marek.safar@gmail.com>
Wed, 7 Nov 2007 20:31:17 +0000 (20:31 -0000)
committerMarek Safar <marek.safar@gmail.com>
Wed, 7 Nov 2007 20:31:17 +0000 (20:31 -0000)
svn path=/trunk/mcs/; revision=89160

mcs/tests/test-anon-72.cs [new file with mode: 0644]

diff --git a/mcs/tests/test-anon-72.cs b/mcs/tests/test-anon-72.cs
new file mode 100644 (file)
index 0000000..d396d29
--- /dev/null
@@ -0,0 +1,27 @@
+public class Test
+{
+       public delegate bool UnaryOperator(object self, out object res);
+       public void AddOperator(UnaryOperator target) {}
+       public bool TryGetValue(object self, out object value)
+       {
+               value = null;
+               return false;
+       }
+    
+       public static void Main ()
+       {
+       }
+       
+       void Foo ()
+       {
+               AddOperator (delegate(object self, out object res) {
+                       object value;
+                       if (TryGetValue(self, out value)) {
+                               res = value;
+                               if (res != null) return true;
+                       }
+                       res = null;
+                       return false;
+               });
+       }
+}