Merge pull request #268 from pcc/menudeactivate
[mono.git] / mcs / tests / gtest-anontype-02.cs
index 0be6afe15f52f3fe808cbf2344a75db356604785..d2404d9f7514d3cdba4d26008351871c3f98e4c8 100644 (file)
@@ -1,11 +1,16 @@
-// Compiler options: -langversion:linq
+
 // Tests anonymous types initialized with local variables
 using System;
 using System.Collections;
 
 public class Test
 {
-       static int Main ()
+       static object TestA (string s)
+       {
+               return new { s };
+       }
+       
+       public static int Main ()
        {
                string Foo = "Bar";
                int Baz = 42;
@@ -15,7 +20,11 @@ public class Test
                        return 1;
                if (v.Baz != 42)
                        return 2;
+                       
+               if (!TestA ("foo").Equals (new { s = "foo" }))
+                       return 3;
                
+               Console.WriteLine ("OK");
                return 0;
        }
 }