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:
authorRaja R Harinath <harinath@hurrynot.org>2005-05-13 16:44:43 +0400
committerRaja R Harinath <harinath@hurrynot.org>2005-05-13 16:44:43 +0400
commit89f9aff6fd37dad8a4654561770b66de1f5223aa (patch)
treeeb8e9baf81fdd6043f0e029b68a7d22de33a4f2e /mcs/tests/test-380.cs
parent6b62970da2ac5655787b436a99334a3db466f5d3 (diff)
In mcs:
Fix #74934. * expression.cs (BinaryResolveOperator): If one of the operands of an equality comparison is 'null' and the other is a pointer type, convert the null to a NullPointer. * convert.cs (ImplicitReferenceConversion): If the expression is a NullLiteral and the target type is a pointer type, return a NullPointer instead. (ImplicitConversionStandard): Likewise. In tests: * test-380.cs: New test from #74934. svn path=/trunk/mcs/; revision=44495
Diffstat (limited to 'mcs/tests/test-380.cs')
-rw-r--r--mcs/tests/test-380.cs11
1 files changed, 11 insertions, 0 deletions
diff --git a/mcs/tests/test-380.cs b/mcs/tests/test-380.cs
new file mode 100644
index 00000000000..1122b48f2d8
--- /dev/null
+++ b/mcs/tests/test-380.cs
@@ -0,0 +1,11 @@
+// Compiler options: -unsafe
+
+class T {
+ static unsafe int Main () {
+ int *a = null;
+ int **b = &a;
+ if (*b == null)
+ return 0;
+ return 1;
+ }
+}