fixes #22362; Compiler crashes with staticBoundsCheck on (#22363)
(cherry picked from commit 825a0e7)
Make repr(HSlice) always available (#22332)
Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com> (cherry picked from commit d37b620)
fixes a typo in the manual (#22383)
ref 0d3bde9#commitcomment-122093273 (cherry picked from commit 7c2a2c8)
fix #20883 Unspecified generic on default value segfaults the compiler (
Fix searchExtPos so that it returns -1 when the path is not a file ext (
destructors: better docs [backport:2.0] (#22391)
(cherry picked from commit 9872453)
Prevent early destruction of gFuns, fixes AddressSanitizer: heap-use-…
fix #18823 Passing Natural to bitops.BitsRange[T] parameter in generi… (
clean up gc:arc or gc:orc in docs and in error messages (#22408)
* clean up gc:arc/orc in docs * in error messages (cherry picked from commit 10a6e4c)
fix #12938 index type of array in type section without static (#20529)
* Remove call-specific replaceTypeVarsN * Run for all call kinds and ignore typedesc * Testcase --------- Co-authored-by: SirOlaf <> (cherry picked from commit baf3504)
fix #19304 Borrowing std/times.format causes Error: illformed AST (#2…
fixes move sideeffects issues [backport] (#22439)
* fixes move sideeffects issues [backport] * fix openarray * fixes openarray (cherry picked from commit faf1c91)
fixes #22469; generates nimTestErrorFlag for top level statements (#2…
* Keep return in mind for sink * Keep track of return using bool instead of mode * Update compiler/injectdestructors.nim * Add back IsReturn --------- Co-authored-by: SirOlaf <> Co-authored-by: Andreas Rumpf <rumpf_a@web.de> (cherry picked from commit c0ecdb0)
round out tuple unpacking assignment, support underscores (#22537)
Fix getAppFilename exception handling (#22544)
* Fix `getAppFilename` exception handling avoid platform-dependendent error handling strategies * more fixes * space (cherry picked from commit bc9785c)
fixes a strictdef ten years long vintage bug, which counts the same t…
fix #22548;environment misses for type reference in iterator access n… (
type annotations for variable tuple unpacking, better error messages (#…
…22611) * type annotations for variable tuple unpacking, better error messages closes #17989, closes nim-lang/RFCs#339 * update grammar * fix test (cherry picked from commit ba158d7)
fixes #22613; Default value does not work with object's discriminator (…
Fix the problem where instances of generic objects with sendable pr…
resolve unambiguous enum symchoices from local scope, error on rest (#…
…22606) fixes #22598, properly fixes #21887 and fixes test case issue number When an enum field sym choice has to choose a type, check if its name is ambiguous in the local scope, then check if the first symbol found in the local scope is the first symbol in the sym choice. If so, choose that symbol. Otherwise, give an ambiguous identifier error. The dependence on the local scope implies this will always give ambiguity errors for unpicked enum symchoices from generics and templates and macros from other scopes. We can change `not isAmbiguous(...) and foundSym == first` to `not (isAmbiguous(...) and foundSym == first)` to make it so they never give ambiguity errors, and always pick the first symbol in the symchoice. I can do this if this is preferred, but no code from CI seems affected. (cherry picked from commit 480e98c)
make getType nodes of generic insts have full inst type (#22655)
fixes #22639 for the third time Nodes generated by `getType` for `tyGenericInst` types, instead of having the original `tyGenericInst` type, will have the type of the last child (due to the `mapTypeToAst` calls which set the type to the given argument). This will cause subsequent `getType` calls to lose information and think it's OK to use the sym of the instantiated type rather than fully expand the generic instantiation. To prevent this, update the type of the node from the `mapTypeToAst` calls to the full generic instantiation type. (cherry picked from commit ed9e3cb)
Fix #21742: Check generic alias depth before skip (#22443)
Close #21742 Checking if there's any side-effects and if just changing typeRel is adequate for this issue before trying to look into related ones. `skipBoth` is also not that great, it can lead to code that works sometimes but fails when the proc is instantiated with branching aliases. This is mostly an issue with error clarity though. --------- Co-authored-by: SirOlaf <unknown> Co-authored-by: SirOlaf <> (cherry picked from commit 2a8c759)
fixes #22662 Procs with constructor pragma doesn't initialize object'…
Make newSeqOfCap not initialize memory. (#21842)
It's used in `newSeqUninitialized`. --------- Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com> (cherry picked from commit 8853fb0)
[minor] merge similar branches in vmgen (#22683)
(cherry picked from commit 2ce9197)
Remove some unnecessary initialization in seq operations (#22677)
refactor semtempl ident declarations, some special word use (#22693)
`semtempl` is refactored to combine the uses of `getIdentNode`, `onlyReplaceParams`, `isTemplParam` and most of `replaceIdentBySym` into a single `getIdentReplaceParams` proc. This might fix possible problems with injections of `nkAccQuoted`. Some special word comparison in `ast` and `semtempl` are also made more efficient. (cherry picked from commit ac1804a)
(cherry picked from commit 38b5823)