Merge pull request #1262 from esdrubal/uriserializationinfo
[mono.git] / mcs / tests / gtest-409.cs
index 96aff7aa3397e94ad0ed6f53ab768504ac1fb1b9..2071b625c3a40ca8c51338cbaf98ede4ae7c6cca 100644 (file)
@@ -1,7 +1,7 @@
 using System;
 
 //
-// Parser conditional and cast expression tests
+// parser conditional and cast expression tests
 //
 
 class A<T>
@@ -31,6 +31,18 @@ public class ConditionalParsing
        struct S
        {
        }
+
+       struct MyTestStruct : IDisposable
+       {
+               public void Dispose ()
+               {
+               }
+
+               public static implicit operator MyTestStruct (int i)
+               {
+                       return new MyTestStruct ();
+               }
+       }
        
        void Test_1 (bool a)
        {
@@ -129,6 +141,20 @@ public class ConditionalParsing
                bool? b = Test (1, arg:2);
        }
 
+       void Test_17 ()
+       {
+               {
+                       using (MyTestStruct? mts = (int?) 1)
+                       {
+                       }
+               }
+       }
+
+       void Test_18 (bool b, Action a)
+       {
+               var e = b ? () => { } : a;
+       }
+
        static void Helper<T> (T arg)
        {
        }