Nim version 2.2.12 released
08 September 2026 The Nim Team
The Nim Team is happy to announce version 2.2.12, the sixth patch release for our stable release, Nim 2.2.
It comes four months after the 2.2.10 release and it contains 142 commits, bringing bugfixes and improvements.
If you’re still on Nim 1.6, take a look at the version 2.0 release article to see all the features you’re missing. If you’ve been using Nim 2.0, the version 2.2 release article shows the improvements available in Nim 2.2.
Installing Nim 2.2.12
Check out if the package manager of your OS already ships version 2.2.12 or install it as described here.
If you have installed a previous version of Nim using choosenim,
getting Nim 2.2.12 is as easy as:
$ choosenim update self
$ choosenim update stable
NOTE: We recommend that you install and use the latest version of choosenim, v0.8.16, available in our choosenim repo.
Alternatively, you can download Nim 2.2.12 from our nightlies builds.
Bugfixes
- Fixed “distinctBase(distinct L[int, 100]) does not match L” (#25789)
- Fixed “
&(strformat): interprets{n-1}as{n(-1)}” (#25821) - Fixed “[C++] ICE expr(sktype): unknown symbol when bindSym constructor proc in macro” (#25814)
- Fixed “SIGSEGV with
refcand RVO” (#25294) - Fixed “Poor error message on cast effect violation” (#22950)
- Fixed “
ProveFieldwarning with nestedcaseobject” (#22791) - Fixed “incompatible function pointer types C error with uint vs csize_t” (#25617)
- Fixed “regression from 2.2.10 to
develwithlentand type aliasing” (#25796) - Fixed “SIGSEGV in ARC/ORC with repeated use of
{.dirty.}template andseqallocations” (#25693) - Fixed “–panics:on drops the nimErr_ check after a closure call (goto exceptions), causing OverflowDefect; regression from #25295” (#25851)
- Fixed “typeof(result) wrongly counted as use-before-init of result on {.requiresInit.} return types (regression from #25151)” (#25857)
- Fixed “Missing eqcopy for value copy of value-type case object with ref field” (#25595)
- Fixed “Iteration on elements of
array, unlikeseq, always copies the elements” (#25849) - Fixed “Regression from refc on 2.2.x to
devel, and refc to ORC on 2.2.x/devel, of redundant stack usage/copies of return value with conditionals/pointers” (#25850) - Fixed “Generic inheritance matching gives
type mismatchwhen object has members” (#22936) - Fixed “
internal error: environment misses: swithiterator/nimvm/variable shadowing” (#25725) - Fixed “SIGSEGV in ARC/ORC with repeated use of
{.dirty.}template andseqallocations” (#25693) - Fixed “Regression from 2.2.10 to
version-2-2/develwithproc r(e: ref Exception) {.raises: [IOError].} = raise (ref IOError)(e)” (#25885) - Fixed “unhandled exception: closureiters.nim(336, 17)
c[i].kind == nkType[AssertionDefect] with closure iterator andexcept IOError, OSError:” (#25903) - Fixed “using quote inside static block causes “Illegal storage access” error” (#18367)
- Fixed “Regression from 2.2.10 to
version-2-2/develwithproc r(e: ref Exception) {.raises: [IOError].} = raise (ref IOError)(e)” (#25885) - Fixed “Manual’s “Delegating bind statements” section is nonsense” (#19240)
- Fixed “Regression from 2.2.10 to
version-2-2/develwith{.pure.}enum and generic inline iterator” (#25908) - Fixed “
type N {.importc: "const void *".} = pointercreates order-dependent compilation failure” (#25931) - Fixed “emscripten ICE: cannot map the empty seq type to a C type” (#25945)
- Fixed “
mapItpointlessly does extra zeroing which, e.g.,newSeqWithoften avoids” (#25956) - Fixed “ImplicitRangeConversion does not recognize constants” (#25608)
- Fixed “C codegen bug: name mangling collision with nested tuples of matching flattened types” (#25883)
- Fixed “
.forbids.type mismatch with closure types for inner proc” (#25976) - Fixed “Nimsuggest SIGSEGVs on any type (ideType) query whose target symbol has no usable type” (#25997)
- Fixed “self-append uses overlapping copyMem and aborts on OpenBSD when mm = refc” (#26007)
- Fixed “Cannot add members to enum-indexed array of seqs at compile time” (#26000)
- Fixed “
deepCopyshould not be allowed for non-copyable type” (#26019) - Fixed “Double destroy with
{.cursor.}” (#26010) - Fixed “compareExchange applies invalid release semantics on failure” (#26027)
- Fixed “
{.push overflowChecks: off.}pragma escapeswhen nimvm:block, affecting runtime code” (#26045) - Fixed “
fatal error: invalid kind for firstOrd(tyEmpty)withproc p(h: static set[bool]) = discard len(h)” (#25942) - Fixed “incorrect
sinkrequires a copy because it's not the last read of 's'error in bothrefcand ARC/ORC” (#26023) - Fixed “
nimpretty --indent:3can inject syntax errors “ (#20078) - Fixed “performance regression from
refcto ORC or--mm:refc --exceptions:gotowith impossible defect-checking” (#26036) - Fixed “Nested
{.cast(gcsafe).}blocks: exiting the inner block cancels the outer block’s cast for the statements after it” (#26092) - Fixed “
ResultUsedwarning behaves inconsistently with manual characterization with--warning:ResultUsed:on” (#26062) - Fixed “SIGABRT or SYSASSERT using ARC/ORC with type forward-reference,
distinct, anddistinctBasewith-d:useMallocor-d:useSysAssert” (#26025) - Fixed “(N)RVO-related stack usage and memory copying regression from Nim 2.2.x to
version-2-4/devel” (#26112) - Fixed “distinct ptr sink’ed too early when only subsequent use is
cast” (#26123) - Fixed “
Error: internal error: expr: param not init k_553648136with nested generic procs” (#26124) - Fixed “refc SIGSEGV on
var r = V(g: true, v: A()); discard move r; GC_fullCollect()on case object” (#25992) - Fixed “Possible memory error (“use after free”)” (#26143)
- Fixed “importc types (eg cint) don’t alias properly, causing codegen errors” (#11797)
- Fixed “
del(seq)performs self-assignment and=destroyfordel(0)of 1-length seq” (#26134) - Fixed “
=destroyshould accept non-parametrized generic” (#26132) - Fixed “JS regression: dockhack.js is invalid” (#26152)
- Fixed “Regression from 2.2.x to
version-2-4/develwith stack usage increase ontry/exceptexpression withrefc” (#26119) - Fixed “std/encodings: convert silently corrupts stateful encodings (ISO-2022-JP) when the output buffer grows” (#26173)
- Fixed “
Utf16Charincorrectly declared as signed” (#26175)
The complete list of changes is available here.