4 // Parser conditional and cast expression tests
9 public static int Value;
12 public class ConditionalParsing
16 public T (string path, bool mode)
17 : this (path, mode, (mode == true ? 1 : 2), 1, int.MaxValue)
21 public T (string s, bool m, int i, int i2, int i3)
28 const int c = true ? 1 : 2;
44 int _provider = mp.Length == a ? _provider = 4 : 5;
47 T? Test_3<T> (Func<T, T, T> result, T t) where T : struct
49 return new T? (result (t, t));
52 void Test_4 (bool x, bool y)
54 int s = x ? (y ? 2 : 4) : (y ? 5 : 7);
57 void Test_5 (bool a, IDisposable fs)
59 using (a ? fs : null) {
60 Console.WriteLine ("");
66 char[] escaped_text_chars =
68 new char [] {'&', '<', '>', '\r', '\n'} :
69 new char [] {'&', '<', '>'};
72 void Test_7 (object o)
77 void Test_8 (DateTime value)
79 var _endDate = value > DateTime.MinValue ? new DateTime ? (value) : null;
86 string a = (b ? (c ? "#" : "#") : "");
91 int i = new int [] { 1, 2, 3 } [1];
96 int a = (int)(A<int>.Value);
99 static int Test_12 (bool arg)
101 return arg ? Foo (() => { return 1; }) : 1;
104 static int Foo (Func<int> arg)
109 void Test_13 (object param)
111 if (param as bool? ?? false) {} else {}
114 public static void Main ()