diff options
-rw-r--r-- | lib/system/seqs_v2.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/system/seqs_v2.nim b/lib/system/seqs_v2.nim index efc2919fd..3a49142bf 100644 --- a/lib/system/seqs_v2.nim +++ b/lib/system/seqs_v2.nim @@ -141,7 +141,7 @@ proc newSeq[T](s: var seq[T], len: Natural) = template capacityImpl(sek: NimSeqV2): int = - if sek.p != nil: (xu.p.cap and not strlitFlag) else: 0 + if sek.p != nil: (sek.p.cap and not strlitFlag) else: 0 func capacity*[T](self: seq[T]): int {.inline.} = ## Returns the current capacity of the seq. @@ -153,7 +153,7 @@ func capacity*[T](self: seq[T]): int {.inline.} = {.cast(noSideEffect).}: let sek = unsafeAddr self - result = capacityImpl(cast[ptr NimSeqV2](sek)[]) + result = capacityImpl(cast[ptr NimSeqV2[T]](sek)[]) {.pop.} # See https://github.com/nim-lang/Nim/issues/21401 |