Created
January 10, 2020 14:50
-
-
Save jlegeny/b10914bb64ba43ffe9cdbbd2dfee6555 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
2> class C { | |
3. var a = 1 | |
4. } | |
5> var arr1 = [C()] | |
arr1: [C] = 1 value { | |
[0] = { | |
a = 1 | |
} | |
} | |
6> var arr2 = arr1 | |
arr2: [C] = 1 value { | |
[0] = { | |
a = 1 | |
} | |
} | |
7> arr2[0].a = 2 | |
8> arr1 | |
$R0: [C] = 1 value { | |
[0] = { | |
a = 2 | |
} | |
} | |
9> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment