Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2015-11-27 14:15:09 +0300
committerMarek Safar <marek.safar@gmail.com>2015-11-27 14:15:09 +0300
commit7dcdeac71b56457f1154cedf6ea78c70d390b814 (patch)
treeb1804a34bf79c509aafe1a6f2018e75cd1ad5661 /mcs/tests/gtest-636.cs
parent9c1c5c0986a497c8979724ff16ed53420c157f8d (diff)
[mcs] Add new test
Diffstat (limited to 'mcs/tests/gtest-636.cs')
-rw-r--r--mcs/tests/gtest-636.cs37
1 files changed, 37 insertions, 0 deletions
diff --git a/mcs/tests/gtest-636.cs b/mcs/tests/gtest-636.cs
new file mode 100644
index 00000000000..9c44fdf69a9
--- /dev/null
+++ b/mcs/tests/gtest-636.cs
@@ -0,0 +1,37 @@
+using System;
+
+class MainClass
+{
+ public static int Main ()
+ {
+ var res = XX () | YY();
+ if (!res.Value)
+ return 1;
+
+ if (xx != 1)
+ return 2;
+
+ if (yy != 1)
+ return 2;
+
+ return 0;
+ }
+
+ static int xx;
+ static bool XX ()
+ {
+ ++xx;
+ Console.WriteLine ("XX");
+ return true;
+ }
+
+ static int yy;
+ static bool? YY ()
+ {
+ if (xx == 1)
+ ++yy;
+
+ Console.WriteLine ("YY");
+ return true;
+ }
+}