diff options
Diffstat (limited to 'lib/system.nim')
-rw-r--r-- | lib/system.nim | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/system.nim b/lib/system.nim index ace3f5e38..a7b22a283 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -4017,6 +4017,7 @@ proc shallow*[T](s: var seq[T]) {.noSideEffect, inline.} = ## marks a sequence `s` as `shallow`:idx:. Subsequent assignments will not ## perform deep copies of `s`. This is only useful for optimization ## purposes. + if s.len == 0: return when not defined(JS) and not defined(nimscript): var s = cast[PGenericSeq](s) s.reserved = s.reserved or seqShallowFlag |