Author: zoltan
Date: 2006-05-07 11:56:22 -0400 (Sun, 07 May 2006)
New Revision: 60383
Modified:
Log:
2006-05-07 Zoltan Varga <vargaz (AT) gmail (DOT) com>
* Nullable.cs (Equals): Fix comparison to null. Fixes #78322.
Modified:
2006-05-07 15:53:05 UTC (rev 60382)
2006-05-07 15:56:22 UTC (rev 60383)
@@ -1,3 +1,7 @@
+2006-05-07 Zoltan Varga <vargaz (AT) gmail (DOT) com>
+
+* Nullable.cs (Equals): Fix comparison to null. Fixes #78322.
+
2006-04-28 Atsushi Enomoto <atsushi (AT) ximian (DOT) com>
* Nullable.cs : updated Nullable<TAPI to 2.0 RTM.
Modified:
2006-05-07 15:53:05 UTC (rev 60382)
2006-05-07 15:56:22 UTC (rev 60383)
@@ -98,6 +98,8 @@
public override bool Equals (object other)
{
+if (other == null)
+return has_value == false;
if (!(other is Nullable<T>))
return false;
@@ -165,7 +167,6 @@
return !left.Equals (right);
}
-
// These are called by the JIT
// Ironicly, the C# code is the same for these two,
// however, on the inside they do somewhat different things
Mono-patches maillist - Mono-patches (AT) lists (DOT) ximian.com