fixes #20015; document shallowCopy does a deep copy with ARC/ORC (#20025)

This commit is contained in:
flywind 2022-07-14 18:42:56 +08:00 • committed by GitHub
commit 10c8e2037d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -473,6 +473,8 @@ proc shallowCopy*[T](x: var T, y: T) {.noSideEffect, magic: "ShallowCopy".}
## Be careful with the changed semantics though!
## There is a reason why the default assignment does a deep copy of sequences
## and strings.
##
## .. warning:: `shallowCopy` does a deep copy with ARC/ORC.
# :array|openArray|string|seq|cstring|tuple
proc `[]`*[I: Ordinal;T](a: T; i: I): T {.