[tuner] handle the case with multiple "preserve" attributes
[mono-project.git] / mcs / tests / dtest-050.cs
blobb79d8a3d126f3e2b0a7469945bd94404a88c4476
1 using System;
4 public struct S
6 public static bool operator true (S s)
8 throw new ApplicationException ();
11 public static bool operator false (S s)
13 return true;
16 public static string operator ! (S s)
18 throw new ApplicationException ();
22 class C
24 static bool Throw ()
26 throw new ApplicationException ("error");
29 static bool Return (bool value)
31 return value;
34 public static int Main ()
36 dynamic d = 4;
38 if (Return (false) && d)
39 return 1;
41 if (Return (true) || d) {
42 } else {
43 return 2;
46 d = false;
47 if (d && Throw ())
48 return 3;
50 d = true;
51 if (d || Throw ()) {
52 } else {
53 return 4;
56 dynamic a = new S ();
57 dynamic b = new S ();
58 var result = a && b;
60 Console.WriteLine ("ok");
61 return 0;