Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by [EMAIL PROTECTED]

http://bugzilla.ximian.com/show_bug.cgi?id=80139

--- shadow/80139        2006-12-03 11:19:55.000000000 -0500
+++ shadow/80139.tmp.2310       2006-12-03 11:19:55.000000000 -0500
@@ -0,0 +1,67 @@
+Bug#: 80139
+Product: Mono: Class Libraries
+Version: 1.2
+OS: GNU/Linux [Other]
+OS Details: SLED 10 (Mono VM Ware Image)
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: CORLIB
+AssignedTo: [EMAIL PROTECTED]                            
+ReportedBy: [EMAIL PROTECTED]               
+QAContact: [EMAIL PROTECTED]
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Attribute.Equals and Attribute.GetHashCode default implementation 
inconsistent
+
+Description of Problem:
+The default implementation of Attribute.GetHashCode and Attribute.Equals 
+are inconsistent, i.e. Attribute.Equals returns true for instances where 
+Attribute.GetHashCode() returns different values.
+The return values differ also from the values of the .NET class library.
+
+Steps to reproduce the problem:
+
+1. Define a subclass of Attribute
+2. Create two instances of this class
+3. Call GetHashCode and Equals and compare the results.
+
+or with the attached example:
+
+1. Compile the attached example with mcs TestAttributeEquality.cs
+2. Run the attached example with mono TestAttributeEquality.exe
+
+
+Actual Results:
+on Mono 1.2:
+attr eq: True
+attr a1 hc: -1022477504
+attr a2 hc: 892325632
+
+i.e. the two attribute instances are considered equal, however, the 
+hashcode is different (see also: method documentation for 
+Object.GetHashCode -> there you can read, that for two instances, that are 
+considered equal, the hashcode should be the same).
+
+on Mono 1.1.16.1:
+attr eq: False
+attr a1 hc: -1022477504
+attr a2 hc: 892325632
+
+In this case, the results were consistent; but different from .NET.
+
+on .NET 2.0:
+attr eq: True
+attr a1 hc: 12333200
+attr a2 hc: 12333200
+
+Attributes are considered equal and the hashcode is the same.
+
+Expected Results:
+At least consistent results from Equals and GetHashCode. Best would be the 
+same behaviour as in .NET 2.0
+
+How often does this happen? 
+always
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to