copying: fold in graph copying (shared nodes, cycles, identity-map fix), serialization rules (constructors, record canonical constructor, ObjectInputFilter), record array components, clone() as a defensive copy, two more compile-error exhibits; 24 tests

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017ic4b4BL3cEPHQTk2McE7C
This commit is contained in:
2026-11-12 20:29:58 +05:30
co-authored by Claude Sonnet 5.5
parent 38fbd513c9
commit c8588ae520
17 changed files with 442 additions and 11 deletions
+11
View File
@@ -0,0 +1,11 @@
== 1. Diamond: root.left and root.right are the same node ==
original : left == right : true
copy constructor : left == right : false
identity-map copy : left == right : true
serialization copy : left == right : true
== 2. Cycle: a -> b -> a ==
original : a.left.left == a : true
copy constructor : StackOverflowError
identity-map copy : copy.left.left == copy : true
identity-map copy : copy != original : true