[mcs] Better detection of null operator inside conditional expression. Fixes #57232
[mono.git] / mcs / tests / gtest-409.cs
index 2f5ea10ae8f4ecd1b3a4ce2e527d11fb98871ef9..8db59d7e48d63650f38af54129943c59971b9e47 100644 (file)
@@ -160,6 +160,21 @@ public class ConditionalParsing
                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)
        {
        }