fix #16458; make useNimRtl compile for --gc:orc (#19512)

* fix #16458; make useNimRtl compile for --gc:orc/arc

* fix tests
This commit is contained in:
flywind 2022-02-11 18:16:27 +08:00 • committed by GitHub
commit b936bfd01a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 5 deletions

View file

@ -75,7 +75,8 @@ proc prepareSeqAdd(len: int; p: pointer; addlen, elemSize, elemAlign: int): poin
proc shrink*[T](x: var seq[T]; newLen: Natural) {.tags: [], raises: [].} =
when nimvm:
setLen(x, newLen)
{.cast(tags: []).}:
setLen(x, newLen)
else:
#sysAssert newLen <= x.len, "invalid newLen parameter for 'shrink'"
when not supportsCopyMem(T):