diff options
author | Juan Carlos <juancarlospaco@gmail.com> | 2023-07-07 04:18:40 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-07 09:18:40 +0200 |
commit | 148ff74c9385909fc1e10c8d29499fb815a94fb8 (patch) | |
tree | d47791fddd44df9ea38f8f8989eb2eedc09af744 | |
parent | a15db5d60b39a24886c692bc9a4e2cb3d5d33ef2 (diff) | |
download | Nim-148ff74c9385909fc1e10c8d29499fb815a94fb8.tar.gz |
Fix #21401 (#22232)
-rw-r--r-- | lib/system/seqs_v2.nim | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/system/seqs_v2.nim b/lib/system/seqs_v2.nim index 4bebf4a82..9aa4e71b9 100644 --- a/lib/system/seqs_v2.nim +++ b/lib/system/seqs_v2.nim @@ -11,6 +11,11 @@ # import typetraits # strs already imported allocateds for us. + +# Some optimizations here may be not to empty-seq-initialize some symbols, then StrictNotNil complains. +{.push warning[StrictNotNil]: off.} # See https://github.com/nim-lang/Nim/issues/21401 + + proc supportsCopyMem(t: typedesc): bool {.magic: "TypeTrait".} ## Default seq implementation used by Nim's core. @@ -149,3 +154,6 @@ func capacity*[T](self: seq[T]): int {.inline.} = {.cast(noSideEffect).}: let sek = unsafeAddr self result = capacityImpl(cast[ptr NimSeqV2](sek)[]) + + +{.pop.} # See https://github.com/nim-lang/Nim/issues/21401 |