summary refs log tree commit diff stats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* [JS] Fix casting to ints (#22327)konsumlamm2023-07-251-0/+21
| | | | | * [JS] Fix casting to ints * Simplify `genCast` by using `asUintN`/`asIntN`
* fixes #22301; fixes #22324; rejects branch initialization with a runtime ↵ringabout2023-07-252-1/+32
| | | | | | | | | | | discriminator with defaults (#22303) * fixes #22301; rejects branch initialization with a runtime discriminator with defaults * undefault nimPreviewRangeDefault * fixes tests * use oldCheckDefault
* Expands codegenDecl to work in function params. fixes #22306 (#22307)Juan M Gómez2023-07-231-0/+17
| | | | | | | * Expands codegenDecl to work in function params. fixes #22306 * makes the test more concrete so T{lit} params dont match * adds sfCodegenDecl
* Testcase for #22008 (#22320)SirOlaf2023-07-231-0/+8
| | | | | Testcase Co-authored-by: SirOlaf <>
* Add test for #22309 (#22316)konsumlamm2023-07-221-0/+11
|
* Fix doc comment rendering for concepts (#22312)konsumlamm2023-07-221-1/+1
|
* fixes #22297; return in the finally in the closure iterators (#22300)ringabout2023-07-221-0/+11
| | | ref #22297; return in the finally in the closure iterators
* fixes CI; disable SSL tests on osx for now (#22304)ringabout2023-07-222-0/+2
| | | | | * test CI * disable osx
* fixes #22210; transform return future in try/finally properly (#22249)ringabout2023-07-212-0/+114
| | | | | | | | | | | * wip; fixes #22210; transform return future in try/finally properly * add a test case for #22210 * minor * inserts a needsCompletion flag * uses copyNimNode
* fixes #22254; fixes #22253; stricteffects bugs on recursive calls (#22294)ringabout2023-07-191-0/+11
|
* fixes #6499; disallow built-in procs used as procvars (#22291)ringabout2023-07-192-4/+6
|
* Fixes Naive virtual crash the compiler fixes #22269 (#22271)Juan M Gómez2023-07-161-0/+4
| | | | | * Fixes Naive virtual crash the compiler fixes #22269 * adds type specific test
* fixes #22256; fixes GC_disableOrc overflow (#22257)ringabout2023-07-111-0/+9
|
* fixes #22237; fixes #21160; wrong cursor on unowned parameters in the for ↵ringabout2023-07-101-0/+55
| | | | | loop in ORC (#22240) fixes #22237; fixes #21160; wrong cursor on unowned parameters
* fixes #22175 (#22229)Andreas Rumpf2023-07-061-0/+12
|
* Fix concepts with doc comments (#22228)Jake Leahy2023-07-061-0/+11
| | | | | | | | | | | | | | | * Add testcase This tries to use a concept with a doc comment which currently leads to a segfault * Ignore nil nodes which happen when there are doc comments in new style concept This was done instead of semming the comments since `semConceptDecl` says it only supports lists of actual statements * Go with alternative fix: Sem comments but ignore them Since `nil` could mean anything it is best to not silently ignore it (In case another nil problem happens in future Also fix test case so it isn't an infinite loop
* fixes #22132; hoisted openArray params result in erroneous code (#22224)ringabout2023-07-051-0/+18
|
* fixes #22138 (#22221)Andreas Rumpf2023-07-041-0/+20
|
* add a test case for #22190 in case of regression (#22217)ringabout2023-07-041-0/+21
|
* fixes #22208; Ambiguous error when import modules with same names but… ↵ringabout2023-07-034-3/+9
| | | | | (#22211) fixes #22208; Ambiguous error when import modules with same names but different aliases
* fixes #22197; Distinct ref objects + destructor cause C++ codegen error (#22207)ringabout2023-07-021-1/+26
|
* reset macrocache after each script evaluation (#22195)Juan M Gómez2023-06-301-0/+27
|
* fix controlflow test (#22194)Jacek Sieka2023-06-301-1/+1
| | | the function actually returns
* fix nested call regression in generic bodies (#22189)metagn2023-06-291-0/+20
| | | fixes #22187
* alternative to #22183; nimscript shares the same compileTime sym with VM ↵ringabout2023-06-292-0/+16
| | | | (#22184)
* fixes #19101; zero initialization union casts (#22185)ringabout2023-06-291-0/+26
| | | | | | | * zero initialization union casts * cleans up and adds a test case for #19101 * uses nimZeroMem
* Don't throw errors on RST tables in Markdown and RstMarkdown modes (#22165)Andrey Makarov2023-06-281-5/+28
| | | | | | | | | | | | | | | | | | | | | * Don't throw errors on RST tables in Markdown and RstMarkdown modes Additions to RST simple tables (#19859) made their parsing more restrictive, which can introduce problems with of some old nimforum posts, which have tables with sloppily aligned columns (like this one: https://github.com/nim-lang/nimforum/issues/330#issuecomment-1376039966). Also this strictness contradicts to Markdown style of not getting in the way (ignoring errors). So this PR proposes a new strategy of dealing with errors: * In Markdown and legacy (old default) RstMarkdown we try to continue parsing, emitting only warnings * And only in pure RST mode we throw a error I expect that this strategy will be applied to more parts of markup code in the future. * Don't return anything in `checkColumns`
* fix new type inference for `noreturn` [backport] (#22182)metagn2023-06-281-0/+35
| | | | | fixes #22180 Backported since apparently the new type inference was backported
* fixes #22001 (#22177)Andreas Rumpf2023-06-271-0/+22
| | | | | * fixes #22001 * added test case
* adds =destroy T support for strings and seqs (#22167)ringabout2023-06-272-7/+7
| | | | | | | * adds =destroy T support for strings and seqs * fixes system * fixes tests
* adds T destructor for refs (#22147)ringabout2023-06-261-0/+1
| | | | | | | | | * adds T destructor for refs * add `newRefdestructor` * adds ref overload for destructors * fixes config
* Fix regression in `std/times` (#22155)Jake Leahy2023-06-261-0/+4
| | | | | | | * Add simple test case Just so the regression doesn't happen again * Specify initDateTime is gcsafe in the forward declarations
* fixes #22148; std/memfiles.memSlices nesting now fails with memory sa… ↵ringabout2023-06-251-0/+15
| | | | | | | (#22154) * fixes #22148; std/memfiles.memSlices nesting now fails with memory safety capture violation * adds a test case
* make `var object` match better than `object` (#22152)metagn2023-06-251-0/+11
| | | | | | | | | | | * fix `var object` not matching better than `object` fixes #13302 * remove comment for brevity * try note * try minimize breaks
* fix VM uint conversion size bug, stricter int gen on JS (#22150)metagn2023-06-253-0/+31
| | | | | | | | | | | * fix VM uint conversion bug, stricter int gen on JS fixes #19929 * fix float -> uint64 conversion too * no need to mask to source type * simpler diff with explanation, add test for described issue
* adds nimbasePattern compiler option (#22144)Juan M Gómez2023-06-241-0/+26
| | | adds optonal --nimbasepattern
* fixes #21110; duplicate proc definitions for inline iters (#21136)ringabout2023-06-221-0/+15
| | | fixes #21110; duplicate proc definitions for iters
* fixes #21231; template with module as parameter elides usage/checking of ↵ringabout2023-06-211-0/+10
| | | | | | | module name specifier (#22109) * fixes #21231; template with module as parameter elides usage/checking of module name specifier * add a test case
* fix #20023 hash for generic tables (#20346)Bung2023-06-211-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | * fix #20023 hash for generic tables * use default computation * Update lib/pure/collections/tables.nim Co-authored-by: Dan Rose <dan@digilabs.io> * Update lib/pure/collections/tables.nim Co-authored-by: Dan Rose <dan@digilabs.io> * Update lib/pure/collections/tables.nim * Update lib/pure/collections/tables.nim * Update t20023.nim --------- Co-authored-by: Dan Rose <dan@digilabs.io> Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* `strutils.split/rsplit` now return src on an empty sep (#22136)Zoom2023-06-213-18/+12
| | | | | | | | | | | | | | | This is a rebase of an earlier rejected PR. Following the discussion around it, this commit provides a valid output for and edge case of an empty separator for `split` and `rsplit` routines. The empty separator is interpreted as "split by no separators" and the initial string is returned. This is consistent with the behaviour of the `set[char]` version of `split`/`rsplit` routines and unifies them all. Compared to a commit merged earlier, this one has a benefit of not using assertions that will be removed in release builds and thus still not preventing possible infinite loops (which was the earlier behaviour for this edge case for separator of type `string`). Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* allow destructors to accept non var parameters; deprecate `proc =destroy(x: ↵ringabout2023-06-211-0/+195
| | | | | | | | | | var T)` (#22130) * make destructors accept non var parameters * define nimAllowNonVarDestructor * add a test case and a changelog * update documentation and error messages * deprecate destructors taking 'var T'
* Amend divmod (#22131)Ryan McConnell2023-06-201-4/+11
| | | | | | | * Add Overflow checks & test adjust * Avoiding nimvm differences in tests * distinguish DivByZeroDefect
* fixes #22123; Compiler bug with default initializer values and arrays (#22128)ringabout2023-06-201-0/+14
|
* fixes #22117; View types lifetime tracking does not work with defer (#22121)ringabout2023-06-191-0/+12
|
* fix scoping regression with calls in generic bodies (#22115)metagn2023-06-172-0/+34
| | | refs #22029, refs https://github.com/status-im/nim-libp2p/actions/runs/5263850340/jobs/9514434659
* Add divmod (#22102)Ryan McConnell2023-06-171-1/+9
| | | | | | | | | | | | | | | | | | | | | | | * Adding divmod * Adding support to VM * Wrapped C structs and funcs * Fix javascript impl * Fixing struct compat * Segregate tests, better compiletime defs * Using `inline` and switch back to `func` * Apply suggestions from code review * Explicit structures --------- Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fixes #16331; aliasing of tuple construction within a single assignme… ↵Andreas Rumpf2023-06-161-0/+15
| | | | | | | (#22113) * fixes #16331; aliasing of tuple construction within a single assignment, great coding style * added test case
* add test to close #7209 (#22110)metagn2023-06-161-0/+13
| | | | | | | * add test to close #7209 was fixed by #22029 * fix echo => doAssert
* add tests to close #7223, close #11733 (#22111)metagn2023-06-163-8/+53
| | | | | add test to close #7223, close #11733 closes #7223, closes #11733, were fixed by #22076
* fixes #22049; fixes #22054; implicit conversion keeps varness (#22097)ringabout2023-06-162-0/+35
| | | | | | | | | | | | | | | | | | | | | * fixes #22054; codegen for var tuples conv * rethink fixes * add test cases * templates only * fixes var tuples * keep varness no matter what * fixes typ.isNil * make it work for generics * restore isSubrange * add a test case as requested