summary refs log tree commit diff stats
Commit message (Collapse)AuthorAgeFilesLines
* docgen: add Pandoc footnotes (fixes #21080) (#22591)Andrey Makarov2023-09-036-101/+221
| | | | | | | | | | This implements Pandoc Markdown-style footnotes, that are compatible with Pandoc referencing syntax: Ref. [^ftn]. [^ftn]: Block. See https://pandoc.org/MANUAL.html#footnotes for more examples.
* resolve unambiguous enum symchoices from local scope, error on rest (#22606)metagn2023-09-035-14/+67
| | | | | | | | | | | | | | | | 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.
* Exclude block from endsInNoReturn, fix regression (#22632)SirOlaf2023-09-022-14/+1
| | | Co-authored-by: SirOlaf <>
* fix isNil folding for compile time closures (#22574)metagn2023-09-022-1/+15
| | | fixes #20543
* Fix the problem where instances of generic objects with `sendable` pragmas ↵Pylgos2023-09-021-1/+1
| | | | | are not being cached (#22622) remove `tfSendable` from `eqTypeFlags`
* use dummy dest for void branches to fix noreturn in VM (#22617)metagn2023-09-012-9/+62
| | | fixes #22216
* unify explicit generic param semchecking in calls (#22618)metagn2023-09-013-7/+26
| | | fixes #9040
* fixes internal error: no generic body fixes #1500 (#22580)Juan M Gómez2023-09-013-1/+19
| | | | | | | | | | | * fixes internal error: no generic body fixes #1500 * adds guard * adds guard * removes unnecessary test * refactor: extracts containsGenericInvocationWithForward
* resolve local symbols in generic type call RHS (#22610)metagn2023-09-013-0/+21
| | | | | resolve local symbols in generic type call fixes #14509
* don't update const symbol on const section re-sems (#22609)metagn2023-09-012-5/+20
| | | fixes #19849
* fixes #22613; Default value does not work with object's discriminator (#22614)ringabout2023-09-012-24/+59
| | | | | | | | | | | | | | | * fixes #22613; Default value does not work with object's discriminator fixes #22613 * merge branches * add a test case * fixes status * remove outdated comments * move collectBranchFields into the global scope
* Fix #22604: Make endsInNoReturn traverse the tree (#22612)SirOlaf2023-09-016-14/+116
| | | | | | | | | | | | | | | | | * Rewrite endsInNoReturn * Handle `try` stmt again and add tests * Fix unreachable code warning * Remove unreachable code in semexprs again * Check `it.len` before skip * Move import of assertions --------- Co-authored-by: SirOlaf <>
* type annotations for variable tuple unpacking, better error messages (#22611)metagn2023-09-016-8/+38
| | | | | | | | | * type annotations for variable tuple unpacking, better error messages closes #17989, closes https://github.com/nim-lang/RFCs/issues/339 * update grammar * fix test
* remove outdated config (#22603)ringabout2023-08-311-4/+0
|
* closes #22600; adds a test case (#22602)ringabout2023-08-311-0/+25
| | | closes #22600
* fixes #17197; fixes #22560; fixes the dest of newSeqOfCap in refc (#22594)ringabout2023-08-312-0/+18
|
* fixes yaml tests (#22595)ringabout2023-08-311-1/+1
|
* handle typedesc params in VM (#22581)metagn2023-08-303-3/+28
| | | | | | | | | * handle typedesc params in VM fixes #15760 * add test * fix getType(typedesc) test
* fixes an issue where sometimes wasMoved produced bad codegen for cpp (#22587)Juan M Gómez2023-08-301-1/+4
|
* deprecate `std/threadpool`; use `malebolgia`, `weave`, `nim-taskpool` ↵ringabout2023-08-292-1/+3
| | | | | | | | | | | instead (#22576) * deprecate `std/threadpool`; use `malebolgia` instead * Apply suggestions from code review * Apply suggestions from code review * change the URL of inim
* clearer error for different size int/float cast in VM (#22582)metagn2023-08-292-3/+14
| | | refs #16547
* fixes #22555; implements `newStringUninit` (#22572)ringabout2023-08-293-22/+49
| | | | | | | | | | | | | * fixes newStringUninitialized; implement `newStringUninitialized` * add a simple test case * adds a changelog * Update lib/system.nim * Apply suggestions from code review rename to newStringUninit
* fixes broken nightlies; follow up #22544 (#22585)ringabout2023-08-291-1/+1
| | | | | ref https://github.com/nim-lang/nightlies/actions/runs/5970369118/job/16197865657 > /home/runner/work/nightlies/nightlies/nim/lib/pure/os.nim(678, 30) Error: getApplOpenBsd() can raise an unlisted exception: ref OSError
* minor style changes in the compiler (#22584)ringabout2023-08-291-3/+2
| | | | | * minor style changes in the compiler * use raiseAssert
* properly fold constants for dynlib pragma (#22575)metagn2023-08-281-1/+1
| | | fixes #12929
* correct logic for qualified symbol in templates (#22577)metagn2023-08-282-1/+8
| | | | | | | * correct logic for qualified symbol in templates fixes #19865 * add test
* define toList procs after add for lists [backport] (#22573)metagn2023-08-281-22/+22
| | | fixes #22543
* newStringOfCap now won't initialize all elements anymore (#22568)ringabout2023-08-281-2/+3
| | | newStringOfCap nows won't initialize all elements anymore
* `initCandidate` and friends now return values (#22570)ringabout2023-08-283-42/+32
| | | | | | | | | * `initCandidate` and friends now return values * fixes semexprs.nim * fixes semcall.nim * Update compiler/semcall.nim
* add test case for #19095 (#22566)Bung2023-08-281-0/+35
|
* close #9334 (#22565)Bung2023-08-271-0/+19
|
* fix #22548;environment misses for type reference in iterator access n… ↵Bung2023-08-273-5/+62
| | | | | | | | | | | | | (#22559) * fix #22548;environment misses for type reference in iterator access nested in closure * fix #21737 * Update lambdalifting.nim * remove containsCallKinds * simplify
* test case haul for old generic/template/macro issues (#22564)metagn2023-08-279-34/+248
| | | | | | | | | | | | * test case haul for old generic/template/macro issues closes #12582, closes #19552, closes #2465, closes #4596, closes #15246, closes #12683, closes #7889, closes #4547, closes #12415, closes #2002, closes #1771, closes #5121 The test for #5648 is also moved into its own test from `types/tissues_types` due to not being joinable. * fix template gensym test
* Improve compiler cli args (#22509)Juan Carlos2023-08-251-4/+10
| | | | | | | * . * Fix cli args out of range with descriptive error instead of crash * https://github.com/nim-lang/Nim/pull/22509#issuecomment-1692259451
* fix generic param substitution in templates (#22535)metagn2023-08-253-2/+93
| | | | | | | * fix generic param substitution in templates fixes #13527, fixes #17240, fixes #6340, fixes #20033, fixes #19576, fixes #19076 * fix bare except in test, test updated packages in CI
* follow up #22549 (#22551)ringabout2023-08-254-4/+7
|
* Add `cursor` to lists iterator variables (#22531)Amjad Ben Hedhili2023-08-241-3/+3
| | | * followup #21507
* fixes a strictdef ten years long vintage bug, which counts the same thing ↵ringabout2023-08-243-10/+23
| | | | | twice (#22549) fixes a strictdef ten years long vintage bug
* Fix `getAppFilename` exception handling (#22544)Jacek Sieka2023-08-241-5/+10
| | | | | | | | | * Fix `getAppFilename` exception handling avoid platform-dependendent error handling strategies * more fixes * space
* fixes #22541; peg matchLen can raise an unlisted exception: Exception (#22545)ringabout2023-08-241-1/+1
| | | The `mopProc` is a recursive function.
* round out tuple unpacking assignment, support underscores (#22537)metagn2023-08-247-33/+60
| | | | | | | | | | | | | | | * round out tuple unpacking assignment, support underscores fixes #18710 * fix test messages * use discard instead of continue Co-authored-by: Andreas Rumpf <rumpf_a@web.de> --------- Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* make jsffi properly gensym (#22539)metagn2023-08-232-22/+35
| | | fixes #21208
* don't render underscore identifiers with id (#22538)metagn2023-08-231-3/+5
|
* Fix #21532: Check if template return is untyped (#22517)SirOlaf2023-08-232-0/+11
| | | | | | | | | * Don't ignore return in semTemplateDef * Add test --------- Co-authored-by: SirOlaf <>
* allow tuples and procs in 'toTask' + minor things (#22530)Andreas Rumpf2023-08-222-3/+3
|
* fix #22492 (#22511)Hamid Bluri2023-08-2211-20/+22
| | | | | | | | | | | | | | | | | | | | | | | | | * fix #22492 * Update nimdoc.css remove scroll-y * Update nimdoc.out.css * Update nimdoc.css * make it sticky again * Update nimdoc.out.css * danm sticky, use fixed * Update nimdoc.out.css * fix margin * Update nimdoc.out.css * make search input react to any change (not just keyboard events) according to https://github.com/nim-lang/Nim/pull/22511#issuecomment-1685218787
* allow non-pragma special words as user pragmas (#22526)metagn2023-08-213-11/+29
| | | | | allow non-pragma special words as macro pragmas fixes #22525
* fix getNullValue for cstring in VM, make other VM code aware of nil cstring ↵metagn2023-08-214-6/+53
| | | | | | | | | | | | | (#22527) * fix getNullValue for cstring in VM fixes #22524 * very ugly fixes, but fix #15730 * nil cstring len works, more test lines * fix high
* use old typeinfo generation for hot code reloading (#22518)metagn2023-08-203-3/+7
| | | | | * use old typeinfo generation for hot code reloading * at least test hello world compilation on orc
* Fix #21722 (#22512)SirOlaf2023-08-191-6/+8
| | | | | | | | | | | * 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>