forked from mono/mono
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Align mcs's tuple deconstruction behavior with csc
Before the code (a, b) = (b, a); was the equivalent of a = b; b = a; now, it evaluates it to so something like tmp1 = a; tmp2 = b; a = tmp2; b = tmp1; Signed-off-by: Bijan Tabatabai <bijan311@yahoo.com>
- Loading branch information
1 parent
644bfc9
commit a3de030
Showing
3 changed files
with
88 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using System; | ||
|
||
class Program | ||
{ | ||
public static int Main () | ||
{ | ||
int x = 1; | ||
int y = 2; | ||
|
||
(x, y) = (y, x); | ||
|
||
if (x != 2) | ||
return 1; | ||
|
||
if (y != 1) | ||
return 2; | ||
|
||
return 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters