[Mono-bugs] [Bug 45854][Maj] Changed - self-assignment operator incorrect for multiple assigment

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Sat, 5 Jul 2003 16:27:30 -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 bmaurer@users.sf.net.

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

--- shadow/45854	Fri Jul  4 22:52:14 2003
+++ shadow/45854.tmp.2757	Sat Jul  5 16:27:30 2003
@@ -36,6 +36,22 @@
 	y -= 3;
 	x =y;
 	Console.WriteLine(x);	//should be -1, I get -1
 	}
 	}
 <<
+
+------- Additional Comments From bmaurer@users.sf.net  2003-07-05 16:27 -------
+This gets rid of all the doubles, and shows that it works with +=
+
+using System;
+class Test {
+	public static void Main()
+	{
+		int x = 0;
+		int y = 2;
+	
+		x = (y += 3);
+		Console.WriteLine (x);  // expect 5, actual 3
+		Console.WriteLine (y);  // expect 5, actual 3
+	}
+}