summary refs log tree commit diff stats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* docgen: add Pandoc footnotes (fixes #21080) (#22591)Andrey Makarov2023-09-032-3/+70
| | | | | | | | | | 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-033-13/+28
| | | | | | | | | | | | | | | | 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-021-13/+0
| | | Co-authored-by: SirOlaf <>
* fix isNil folding for compile time closures (#22574)metagn2023-09-021-0/+8
| | | fixes #20543
* use dummy dest for void branches to fix noreturn in VM (#22617)metagn2023-09-011-0/+32
| | | fixes #22216
* unify explicit generic param semchecking in calls (#22618)metagn2023-09-011-1/+20
| | | fixes #9040
* fixes internal error: no generic body fixes #1500 (#22580)Juan M Gómez2023-09-011-0/+8
| | | | | | | | | | | * 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-012-0/+20
| | | | | resolve local symbols in generic type call fixes #14509
* don't update const symbol on const section re-sems (#22609)metagn2023-09-011-0/+10
| | | fixes #19849
* fixes #22613; Default value does not work with object's discriminator (#22614)ringabout2023-09-011-1/+16
| | | | | | | | | | | | | | | * 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-012-2/+61
| | | | | | | | | | | | | | | | | * 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-012-1/+18
| | | | | | | | | * type annotations for variable tuple unpacking, better error messages closes #17989, closes https://github.com/nim-lang/RFCs/issues/339 * update grammar * fix test
* 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-311-0/+17
|
* handle typedesc params in VM (#22581)metagn2023-08-302-2/+21
| | | | | | | | | * handle typedesc params in VM fixes #15760 * add test * fix getType(typedesc) test
* clearer error for different size int/float cast in VM (#22582)metagn2023-08-291-0/+3
| | | refs #16547
* fixes #22555; implements `newStringUninit` (#22572)ringabout2023-08-291-0/+11
| | | | | | | | | | | | | * fixes newStringUninitialized; implement `newStringUninitialized` * add a simple test case * adds a changelog * Update lib/system.nim * Apply suggestions from code review rename to newStringUninit
* correct logic for qualified symbol in templates (#22577)metagn2023-08-281-0/+4
| | | | | | | * correct logic for qualified symbol in templates fixes #19865 * add test
* 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-272-0/+43
| | | | | | | | | | | | | (#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
* fix generic param substitution in templates (#22535)metagn2023-08-251-0/+80
| | | | | | | * 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
* round out tuple unpacking assignment, support underscores (#22537)metagn2023-08-244-6/+18
| | | | | | | | | | | | | | | * 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-231-0/+6
| | | fixes #21208
* Fix #21532: Check if template return is untyped (#22517)SirOlaf2023-08-231-0/+8
| | | | | | | | | * Don't ignore return in semTemplateDef * Add test --------- Co-authored-by: SirOlaf <>
* allow non-pragma special words as user pragmas (#22526)metagn2023-08-211-0/+5
| | | | | 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-211-0/+31
| | | | | | | | | | | | | (#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-201-0/+1
| | | | | * use old typeinfo generation for hot code reloading * at least test hello world compilation on orc
* replace getOpt with getopt (#22515)Nan Xiao2023-08-196-6/+6
|
* Add staticFileExists and staticDirExists (#22278)Tomohiro2023-08-182-0/+10
|
* make float32 literals stringifying behave in JS the same as in C (#22500)ringabout2023-08-171-3/+2
|
* cascade tyFromExpr in type conversions in generic bodies (#22499)metagn2023-08-171-0/+8
| | | fixes #22490, fixes #22491, adapts #22029 to type conversions
* close #22748; cursorinference + -d:nimNoLentIterators results in err… (#22495)ringabout2023-08-171-0/+46
| | | closed #22748; cursorinference + -d:nimNoLentIterators results in erroneous recursion
* When in object handles procedure call again, fixes #22474 (#22480)Jason Beetham2023-08-151-0/+32
| | | Ping @narimiran please backport to the 2.0 line.
* Markdown code blocks migration part 8 (#22478)Andrey Makarov2023-08-151-2/+2
|
* fixes #22469; generates nimTestErrorFlag for top level statements (#22472)ringabout2023-08-142-0/+20
| | | fixes #22469; generates `nimTestErrorFlag` for top level statements
* relax the parameter of `ensureMove`; allow let statements (#22466)ringabout2023-08-122-2/+3
| | | | | * relax the parameter of `ensureMove`; allow let statements * fixes the test
* close #17045;Compiler crash when a tuple iterator with when nimvm is … ↵Bung2023-08-111-0/+28
| | | | | (#22452) close #17045;Compiler crash when a tuple iterator with when nimvm is iterated in a closure iterator
* close #18103 internal error: inconsistent environment type (#22451)Bung2023-08-111-0/+35
|
* fixes move sideeffects issues [backport] (#22439)ringabout2023-08-101-0/+18
| | | | | | | * fixes move sideeffects issues [backport] * fix openarray * fixes openarray
* adds support for functor in member (#22433)Juan M Gómez2023-08-101-0/+11
| | | | | * adds support for functor in member * improves functor test
* fix #19304 Borrowing std/times.format causes Error: illformed AST (#20659)Bung2023-08-102-3/+27
| | | | | | | | | * fix #19304 Borrowing std/times.format causes Error: illformed AST * follow suggestions * mitigate for #4121 * improve error message
* Fix #21760 (#22422)SirOlaf2023-08-101-0/+8
| | | | | | | | | | | * Remove call-specific replaceTypeVarsN * Run for all call kinds and ignore typedesc * Testcase --------- Co-authored-by: SirOlaf <>
* makes asmnostackframe work with cpp member #22411 (#22429)Juan M Gómez2023-08-091-0/+37
|
* Fix #5780 (#22428)Bung2023-08-091-0/+3
| | | * fix #5780
* fixes cascades of out parameters, which produces wrong ProveInit warnings ↵ringabout2023-08-091-0/+14
| | | | (#22413)
* fix #12938 index type of array in type section without static (#20529)Bung2023-08-092-0/+15
| | | | | | | | | | | | | * fix #12938 nim compiler assertion fail when literal integer is passed as template argument for array size * use new flag tfImplicitStatic * fix * fix #14193 * correct tfUnresolved add condition * clean test
* fixes #22419; async/closure environment does not align local variables (#22425)ringabout2023-08-091-0/+16
| | | | | | | | | | | | | | | | | * fixes #22419; async/closure environment does not align local variables * Apply suggestions from code review * Update tests/align/talign.nim Co-authored-by: Jacek Sieka <arnetheduck@gmail.com> * apply code review * update tests --------- Co-authored-by: Jacek Sieka <arnetheduck@gmail.com>
* fix #20891 Illegal capture error of env its self (#22414)Bung2023-08-091-0/+28
| | | | | * fix #20891 Illegal capture error of env its self * fix innerClosure too earlier, make condition shorter