copying: deep vs shallow copy module (clone() traps, copy constructors, serialization copy, records, defensive copies, collection copies), 17 contract tests

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017ic4b4X2xx7RrveVQU9R1N
This commit is contained in:
asmhatre
2026-11-12 20:18:06 +05:30
parent 682b7b067c
commit 38fbd513c9
29 changed files with 1201 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
== Identity before any change ==
alias == original : true
shallow == original : false
shallow.address == original.address : true
shallow.tags == original.tags : true
deep.address == original.address : false
deep.tags == original.tags : false
== Now mutate the ORIGINAL (name, city, tags) ==
original : Asha K | Pune | [java, spring, jpa]
alias : Asha K | Pune | [java, spring, jpa]
shallow : Asha | Pune | [java, spring, jpa]
deep : Asha | Mumbai | [java, spring]