[jit] Fix the saving of the 'cfg->ret_var_set' flag when inlining, it was set to...
[mono.git] / mcs / tests / dtest-050.cs
1 using System;
2
3
4 public struct S
5 {
6         public static bool operator true (S s)
7         {
8                 throw new ApplicationException ();
9         }
10
11         public static bool operator false (S s)
12         {
13                 return true;
14         }
15
16         public static string operator ! (S s)
17         {
18                 throw new ApplicationException ();
19         }
20 }
21
22 class C
23 {
24         static bool Throw ()
25         {
26                 throw new ApplicationException ("error");
27         }
28         
29         static bool Return (bool value)
30         {
31                 return value;
32         }
33         
34         public static int Main ()
35         {
36                 dynamic d = 4;
37                 
38                 if (Return (false) && d)
39                         return 1;
40
41                 if (Return (true) || d) {
42                 } else {
43                         return 2;
44                 }
45
46                 d = false;
47                 if (d && Throw ())
48                         return 3;
49                 
50                 d = true;
51                 if (d || Throw ()) {
52                 } else {
53                         return 4;
54                 }
55                 
56                 dynamic a = new S ();
57                 dynamic b = new S ();
58                 var result = a && b;
59                 
60                 Console.WriteLine ("ok");
61                 return 0;
62         }
63         
64 }