[mcs] Pending implementation of accessors cannot hide base implementation with differ...
[mono.git] / mcs / tests / test-pattern-07.cs
index 8743b35c5e7d8cf4de5bb912afdee3bcb523c688..bc7dfda0a89bdbb0566ec87348ce2107546519e1 100644 (file)
@@ -31,6 +31,24 @@ class PropertyPattern
                if (res2)
                        return 5;
 
+               object o3 = new X () {
+                       Value = 5
+               };
+
+               if (o3 is X { Value is 6 })
+                       return 6;
+
+               if (!(o3 is X { Value is 5 }))
+                       return 7;
+
+               object o4 = new X () {
+                       NullableValue = 4
+               };
+
+               bool res3 = o4 is X { NullableValue is (byte) 4 };
+               if (!res3)
+                       return 8;
+
                Console.WriteLine("ok");
                return 0;
        }
@@ -39,6 +57,10 @@ class PropertyPattern
 class X
 {
        public object Field { get; set; }
+
+       public object Value { get; set; }
+
+       public long? NullableValue { get; set; }
 }
 
 class Y
@@ -49,5 +71,5 @@ class Y
        {
                x = 4;
                return true;
-       }       
-}
\ No newline at end of file
+       }
+}