[Mono-bugs] [Bug 475354] Null values for nullable structs are reported as not equal to each other

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Feb 25 12:50:28 EST 2009


User dmitchell at logos.com added comment

David Mitchell <dmitchell at logos.com> changed:

           What    |Removed                     |Added
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |

--- Comment #2 from David Mitchell <dmitchell at logos.com>  2009-02-25 10:50:27 MST ---
It seems that this hasn't been completely fixed, as evidenced by this log from
the C# shell:

Mono C# Shell, type "help;" for help

Enter statements below.
csharp> DateTime? a = default(DateTime?);
csharp> DateTime? b = default(DateTime?);
csharp> a == b;
csharp> default(DateTime?) == default(DateTime?);
csharp> a == default(DateTime?);
csharp> default(DateTime?) == b;

Here we see that comparing default(DateTime?) to itself or to an object that
has been set to default(DateTime?) yields the expected value, but if we assign
two DateTime? objects to default(DateTime?) and compare them to each other, we
get an incorrect result.

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list