Created
April 26, 2016 03:56
-
-
Save synap5e/78de33d0972c155e9bf9ac655ed8b383 to your computer and use it in GitHub Desktop.
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
void main() { | |
{{{int z} y} x} a = {x:{y:{z:1}}}; | |
{{{int z} y} x} b = a; | |
assert a == b; | |
b.x.y = {z:2}; | |
assert a != b; | |
b.x.y.z = 1; | |
assert a == b; | |
int[][][] p = [[[1, 2], [3, 4]], [[5, 6]], [[7]]]; | |
int[][][] q = p; | |
assert q == p; | |
p[1][0][1] = 0; | |
assert q != p; | |
p[1][0][1] = 6; | |
assert p == q; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment