[Mono-bugs] [Bug 29000][Min] New - Incorrect right-evaluation in assignament

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
15 Aug 2002 10:08:39 -0000


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 sergio.gomez@consejo-eps.uco.es.

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

--- shadow/29000	Thu Aug 15 06:08:39 2002
+++ shadow/29000.tmp.6414	Thu Aug 15 06:08:39 2002
@@ -0,0 +1,65 @@
+Bug#: 29000
+Product: Mono/Runtime
+Version: unspecified
+OS: Debian Woody
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Minor
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: sergio.gomez@consejo-eps.uco.es               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Incorrect right-evaluation in assignament
+
+Description of Problem:
+-----------------------
+
+This one-line statement for swap two integers don't works:
+a^=b^=a^=b;
+
+Example code:
+-------------
+
+using System;
+
+class Test {
+ static public int Main () {
+  int a = 4321;
+  int b = 1234;
+
+  Console.WriteLine ("Before {0} {1}",a,b);
+  a^=b^=a^=b;
+  Console.WriteLine ("After {0} {1}",a,b);
+
+  return 1;
+ }
+}
+
+Actual Results:
+----------------
+
+bash$ mono test.exe
+Before 4321 1234
+After 0 4321
+
+Expected Results:
+------------------
+
+bash$ mono test.exe
+Before 4321 1234
+After 1234 4321
+
+
+How often does this happen? 
+
+Always
+
+Additional Information:
+
+bash$ dpkg -s mono |grep Version
+Version: 0.13-20020813-1