[mcs] Better detection of null operator inside conditional expression. Fixes #57232
[mono.git] / mcs / tests / gtest-409.cs
index 1d2a5ad00fa628e21febda28d8547cff4713be55..8db59d7e48d63650f38af54129943c59971b9e47 100644 (file)
@@ -150,6 +150,31 @@ public class ConditionalParsing
                }
        }
 
+       void Test_18 (bool b, Action a)
+       {
+               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)
        {
        }