From 148ff74c9385909fc1e10c8d29499fb815a94fb8 Mon Sep 17 00:00:00 2001 From: Juan Carlos Date: Fri, 7 Jul 2023 04:18:40 -0300 Subject: [PATCH] Fix #21401 (#22232) --- lib/system/seqs_v2.nim | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/system/seqs_v2.nim b/lib/system/seqs_v2.nim index 4bebf4a827..9aa4e71b98 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