Skip to content

Instantly share code, notes, and snippets.

@jlegeny
Created January 10, 2020 14:50
Show Gist options
  • Save jlegeny/b10914bb64ba43ffe9cdbbd2dfee6555 to your computer and use it in GitHub Desktop.
Save jlegeny/b10914bb64ba43ffe9cdbbd2dfee6555 to your computer and use it in GitHub Desktop.
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