[Mono-bugs] [Bug 475354] New: Null values for nullable structs are reported as not equal to each other
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Thu Feb 12 15:07:46 EST 2009
https://bugzilla.novell.com/show_bug.cgi?id=475354
Summary: Null values for nullable structs are reported as not
equal to each other
Classification: Mono
Product: Mono: Class Libraries
Version: 2.2.x
Platform: Macintosh
OS/Version: Mac OS X 10.5
Status: NEW
Severity: Normal
Priority: P5 - None
Component: CORLIB
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: dmitchell at logos.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_5; en-us)
AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.20.1
Null values for nullable structs are reported as being not equal.
For example, take this expression (you can run it in the C# repl):
default(DateTime?) == default(DateTime?)
You would expect this expression to evaluate to true, and it does in the
Microsoft implementation of .NET, but it does not for Mono.
Reproducible: Always
Steps to Reproduce:
1. Open the C# repl
2. Type "default(DateTime?) == default(DateTime?)
Actual Results:
The repl reports "false"
Expected Results:
The repl should report "true"
Similar expressions, such as
default(int?) == default(int?)
and
(object)default(DateTime?) == (object)default(DateTime?)
work as expected. This seems to only affect uncasted null values for nullable
structs.
--
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