[Mono-bugs] [Bug 43667][Wis] New - BitArray.And should modify object
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
Mon, 26 May 2003 09:17:23 -0400 (EDT)
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 lauritz2@hotmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=43667
--- shadow/43667 Mon May 26 09:17:23 2003
+++ shadow/43667.tmp.29968 Mon May 26 09:17:23 2003
@@ -0,0 +1,78 @@
+Bug#: 43667
+Product: Mono/Class Libraries
+Version: unspecified
+OS: All
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: lauritz2@hotmail.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: BitArray.And should modify object
+
+Description of Problem:
+When the And-method is called on an instance of the class BitArray in
+System.Collections, e.g. "a.And(b)", the instance "a" should be modified.
+Now a new object is created and returned and the instance, a, is left
+unmodified.
+
+Steps to reproduce the problem:
+1. Paste the C# code-example into a file called "test.cs" from
+http://msdn.microsoft.com/library/en-
+us/cpref/html/frlrfsystemcollectionsbitarrayclasstopic.asp
+2. compile it
+
+Actual Results:
+
+ Using Monos implementation:
+ (note the line marked with "****")
+
+ H:\test>mono test.exe
+ Initial values
+ myBA1: False False True True
+ myBA2: False True False True
+
+ Result
+ AND: False False False True
+
+ After AND
+ myBA1: False False True True ****
+ myBA2: False True False True
+
+ Exception: System.ArgumentException: An invalid argument was specified.
+ in <0x00080> 00 System.Collections.BitArray:And
+(System.Collections.BitArray)
+ in <0x0031d> 00 .SamplesBitArray:Main ()
+
+Expected Results:
+
+ Using Microsofts implementation:
+ (note the line marked with "****")
+
+ H:\test>test.exe
+ Initial values
+ myBA1: False False True True
+ myBA2: False True False True
+
+ Result
+ AND: False False False True
+
+ After AND
+ myBA1: False False False True ****
+ myBA2: False True False True
+
+ Exception: System.ArgumentException: Array lengths must be the same.
+ at System.Collections.BitArray.And(BitArray value)
+ at SamplesBitArray.Main()
+
+How often does this happen?
+Always
+
+Additional Information:
+Using the binary version of mono version 0.24.