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>2016-03-08 15:39:48 +0300
committerMarek Safar <marek.safar@gmail.com>2016-03-08 15:41:14 +0300
commitf9df298156b35f3596c1ef11c482081d112192e1 (patch)
tree06dabfcfaf9afb3566f0668e90999e8cc4e508f2 /mcs/tests/gtest-540.cs
parenteaa4d8c4406723920e4957a62aa388dd4f31bd4a (diff)
[mcs] Fixes codegen for lifted null bitwise operators with constant left side of null value
Diffstat (limited to 'mcs/tests/gtest-540.cs')
-rw-r--r--mcs/tests/gtest-540.cs29
1 files changed, 29 insertions, 0 deletions
diff --git a/mcs/tests/gtest-540.cs b/mcs/tests/gtest-540.cs
index 61c94270ef5..46b6f3b6ce0 100644
--- a/mcs/tests/gtest-540.cs
+++ b/mcs/tests/gtest-540.cs
@@ -98,6 +98,35 @@ class C
if ((null | b4) != true)
return 103;
+
+ bool? x_n = null;
+ bool? x_f = false;
+ bool? x_t = true;
+
+ bool? res;
+ res = null & x_n;
+ if (res.HasValue)
+ return 201;
+
+ res = null & x_t;
+ if (res.HasValue)
+ return 202;
+
+ res = null & x_f;
+ if (res.Value != false)
+ return 203;
+
+ res = null | x_n;
+ if (res.HasValue)
+ return 204;
+
+ res = null | x_t;
+ if (res.Value != true)
+ return 205;
+
+ res = null | x_f;
+ if (res.HasValue)
+ return 206;
return 0;
}