[Mono-bugs] [Bug 45854][Wis] New - self-assignment operator incorrect for multiple assigment

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Fri, 4 Jul 2003 22:50:09 -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 bsuss_ca@yahoo.ca.

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

--- shadow/45854	Fri Jul  4 22:50:09 2003
+++ shadow/45854.tmp.20218	Fri Jul  4 22:50:09 2003
@@ -0,0 +1,41 @@
+Bug#: 45854
+Product: Mono/MCS
+Version: unspecified
+OS: other
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: bsuss_ca@yahoo.ca               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: self-assignment operator incorrect for multiple assigment
+
+The self assigment decrement operator does not work correctly in a multiple
+assigment (e.g., "x=y-=z;").  Using mono-0.25.  See Code:
+
+>>
+using System;
+class Test
+{
+public static void Main()
+	{
+	double x=1.0;
+	double y=2.0;
+
+	 x = y -= 3;
+	 Console.WriteLine(x);  //should be -1, I get 3
+
+	x=1.0;
+	y=2.0;
+	y -= 3;
+	x =y;
+	Console.WriteLine(x);	//should be -1, I get -1
+	}
+	}
+<<