[mcs] Better detection of null operator inside conditional expression. Fixes #57232
[mono.git] / mcs / tests / gtest-409.cs
index 2071b625c3a40ca8c51338cbaf98ede4ae7c6cca..8db59d7e48d63650f38af54129943c59971b9e47 100644 (file)
@@ -155,6 +155,26 @@ public class ConditionalParsing
                var e = b ? () => { } : a;
        }
 
+       void Test_19 (int[,] table)
+       {
+               var x = 1 > 0  ? table[5, 1] : 0;
+       }
+
+       void Test_20 ()
+       {
+               var t = (Object)string.Empty;
+       }
+
+       void Test_21 ()
+       {
+               var t = (Int32)sbyte.MaxValue;
+       }
+
+       void Test_22 (bool args)
+       {
+               var x = args ?.2f : -.2f;
+       }
+
        static void Helper<T> (T arg)
        {
        }