[Mono-bugs] [Bug 572874] New: ValueType.Equals fails on structs containing nullables
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Thu Jan 21 21:37:17 EST 2010
http://bugzilla.novell.com/show_bug.cgi?id=572874
http://bugzilla.novell.com/show_bug.cgi?id=572874#c0
Summary: ValueType.Equals fails on structs containing nullables
Classification: Mono
Product: Mono: Class Libraries
Version: 2.6.x
Platform: All
OS/Version: Windows Vista
Status: NEW
Severity: Major
Priority: P5 - None
Component: CORLIB
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: tagdev at gmail.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Blocker: ---
Created an attachment (id=338176)
--> (http://bugzilla.novell.com/attachment.cgi?id=338176)
Patch to apply to the trunk, which adds a test for this bug.
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.3)
Gecko/20090824 Firefox/3.5.3 GTB6 (.NET CLR 3.5.30729)
When comparing struct data that are exact copies of each other, the result
would incorrectly indicate that they are different if any nullable data-type is
part of of the data structure's definition.
Reproducible: Always
Steps to Reproduce:
1. Define a struct data-type that contain a nullable type, e.g., Nullable<int>
2. Create two instances of the defined struct, for example named x and y, and
populate both with the exact same data
3. Compare the two instances using x.Equals(y), which would use
ValueType.Equals for the comparison
Actual Results:
False is returned from ValueType.Equals
Expected Results:
ValueType.Equals must return true in this case
This bug is not specific to Windows, but was detected on openSUSE 11.1 as well.
--
Configure bugmail: http://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