[VM/values/value] create proper constructor overloads for deep-copying
newQuantity(.., copy=true) would be the example. It should operate statically,
at runtime!
# TODO(VM/values/value) add better unit-tests for deep copies
# right now, in tests/unittests/deepcopies, we're testing integers
# strings, blocks and dictionaries. The tests could/should cover pretty
# much every type (nested or not)
# labels: values, unit-test
# TODO(VM/values/value) create proper constructor overloads for deep-copying
# `newQuantity(.., copy=true)` would be the example. It should operate statically,
# at runtime!
# labels: values, enhancement, cleanup
proc copyValue*(v: Value): Value {.inline.} =
## copy given value (deep copy) and return
## the result
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
[VM/values/value] create proper constructor overloads for deep-copying
newQuantity(.., copy=true)
would be the example. It should operate statically, at runtime!https://github.com/arturo-lang/arturo/blob/818d6a565f675c4ee2f9801899bc50f3a2bd3784/src/vm/values/value.nim#L674
175c29a38d7939e8b27d6d724e240ef83083d2ce