summary refs log tree commit diff stats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* fix #20152 Illegal capture of closure iterator, when should be legal (#20607)Bung2022-10-211-0/+20
|
* fix #19349 incompatible type when mixing float32 and cfloat in generics (#20551)Bung2022-10-211-0/+19
|
* fix #19426 compile error using when/elif/else and typedesc in template (#20550)Bung2022-10-211-0/+16
|
* closes #19969; add testcase for #19969 #15952 #16306 (#20610)ringabout2022-10-211-0/+27
| | | closes #19969; add testcase
* implemented strictCaseObjects (#20608)Andreas Rumpf2022-10-211-0/+27
| | | | | * implemented strictCaseObjects * changelog update
* Implemented `mSlice` on the VM allowing `toOpenArray` to work at compile ↵Jason Beetham2022-10-201-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | time. (#20586) * Implemented opcSlice to make 'toOpenArray' work on the VM * Added nkOpenArray for VM to reduce bodgeness * Fixed range issues and erraneous comments * Range check correctly for openArrays in opcLdArr * Inverted logic for ldArr checking * vm now supports slicing strings * Added string tests * Removed usage of 'nkOpenArray' and redundant operations * Refactored vmSlice implementation, removing redundant and incorrect code * Made tuples go throw opcWrObj for field assignment * All strkinds should be considered for openarrays
* [backport] Handle nkOpenSymChoice for nkAccQuoted in considerQuotedIdent ↵SirOlaf2022-10-181-0/+15
| | | | | | | | | | | | (#20578) * Handle nkOpenSymChoice for nkAccQuoted in considerQuotedIdent * Add test * Update compiler/lookups.nim Co-authored-by: SirOlaf <a> Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* refactor envvars, oserrors; register vmops (#20592)ringabout2022-10-181-1/+2
| | | | | * refactor envvars, oserrors; register vmops * remove type definitions
* fixes niminst with stricteffects; add testcase for niminst (#20587)ringabout2022-10-181-0/+5
| | | fixes niminst with stricteffects; add testcase
* fixes #20572 (#20585)Andreas Rumpf2022-10-171-0/+29
| | | | | * fixes #20572 * added a test case
* Fix #12517 Allow single branch when nimvm statements (#20577)Can Lehmann2022-10-171-0/+21
| | | Allow single branch when statements
* fixes #20515; base `method` requires explicit `{.gcsafe.}` to be GC-safe ↵ringabout2022-10-161-0/+20
| | | | | | | (#20574) * fixes #20515; base requires explicit `{.gcsafe.}` to be GC-safe * add tests
* fixes #19162; enable `strictEffects` for v2 (#19380)ringabout2022-10-155-8/+8
| | | | | | | | | | | | | | | | | | | * enable stricteffects * add gcsafe * fix tests * use func * fixes pegs tests * explicitly mark repr related procs with noSideEffect * add nimLegacyEffects * change URL * fixes docopt * add `raises: []` to repr * fixes weave * fixes nimyaml * fixes glob * fixes parsetoml * Apply suggestions from code review * Update testament/important_packages.nim * add legacy:laxEffects
* fix #19700 Crash when passing a template to a generic functio… (#20567)Bung2022-10-151-0/+10
| | | fix nim-lang#19700 Crash when passing a template to a generic function expecting a procedure
* fix #8821 JS codegen can produce extreme switch statements with case … ↵Bung2022-10-141-4/+1
| | | | | | | (#20548) * fix #8821 JS codegen can produce extreme switch statements with case a of range * remove totalRange
* fixes #3748 (#20563)Andreas Rumpf2022-10-141-0/+14
| | | | | | | | | * fixes #3748 * fix the regression * don't use the new allocator for the SSL wrapper * fixes regression
* fix #18136 tests/proc/t17157.nim now gives SIGSEGV instead of error (#20555)Bung2022-10-131-1/+0
|
* fix #18990 Regression in proc symbol resolution; Error: attempting to… ↵Bung2022-10-123-0/+7
| | | | | (#20554) fix #18990 Regression in proc symbol resolution; Error: attempting to call routine
* oids sticks to 24 length strings; fixes breaking changes (#20546)ringabout2022-10-121-1/+1
| | | oids sticks 24 length strings
* fix #7446 Generics: type mismatch 'SomeunsignedInt or Natural' (#20522)Bung2022-10-111-0/+10
| | | | | * fix #7446 Generics: type mismatch 'SomeunsignedInt or Natural' * try fix
* 'lock levels' are deprecated, now a noop (#20539)ringabout2022-10-1126-63/+56
| | | | | * 'lock levels' are deprecated, now a noop * fixes tests
* Make rstgen work with gcsafe (#20534)ringabout2022-10-101-0/+5
| | | | | | | | | | | * Make rstgen work with gcsafe Co-authored-by: Danil Yarantsev <tiberiumk12@gmail.com> * add tests and fixes * if nimHasWarningAsError Co-authored-by: Danil Yarantsev <tiberiumk12@gmail.com>
* Automatic dereferencing is removed (#20531)ringabout2022-10-102-49/+15
|
* fix #18886 crash on ambiguous proc cast (#20472)Bung2022-10-101-0/+18
| | | | | * fix #18886 crash on ambiguous proc cast * follow suggestion
* fixes #20516; system.create doesn't work with bitfield objects (#20518)ringabout2022-10-081-0/+7
| | | | | | | * Revert "fixes #19000 (#19032)" This reverts commit 2bda4a30a6b12dd0840dc347e454e54fe26721e7. * fixes #20516; add testcase
* closes #12994; add testcase (#20511)ringabout2022-10-081-0/+23
|
* fixes devel CI (#20512)ringabout2022-10-071-1/+1
|
* remove implicit let/var default initialization (#20508)ringabout2022-10-071-16/+16
|
* DAA and 'out' parameters (#20506)Andreas Rumpf2022-10-063-1/+84
| | | | | | | | | | | * DAA and 'out' parameters * progress * documented strictDefs and out parameters * docs, tests and a bugfix * fixes silly regression
* correct grammar (ref #20199) and add check for grammar.txt (#20494)ringabout2022-10-061-0/+7
| | | | | | | * correct grammar; ref #20199 * add check for keeping grammar.txt up-to-date * add nimTestGrammar
* closes #9401; add testcase (#20507)ringabout2022-10-061-0/+49
|
* follow up #20109; remove `shallow` seqs/strings for ORC (#20502)ringabout2022-10-065-8/+12
| | | | | | | * remove `shallow` seqs/strings for ORC * add a changelog item * change url of DelaunayNim
* Make output assertion deterministic for test for #7172 (#20495)Matt Haggard2022-10-051-2/+2
| | | Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
* closes #11267; closes #11259; closes #11085; add testcases (#20505)ringabout2022-10-062-0/+36
| | | | | | | * closes #11267; add testcase * closes #11259 * closes #11085
* Markdown indented code blocks (#20473)Andrey Makarov2022-10-052-6/+59
| | | | | | | | | | | | | | | | | | | | | | | * Implement Markdown indented code blocks Additional indentation of 4 spaces makes a block an "indented code block" (monospaced text without syntax highlighting). Also `::` RST syntax for code blocks is disabled. So instead of ```rst see:: Some code ``` the code block should be written as ```markdown see: Some code ``` * Migrate RST literal blocks :: to Markdown's ones
* strutils, rstgen: avoid deprecated `strutils.delete` (#20488)ee72022-10-051-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The strutils `delete` func with signature func delete*(s: var string, first, last: int) was deprecated in adba5eb45e0a, in favor of one with signature func delete*(s: var string, slice: Slice[int]) However, a few procedures still used the deprecated form. This commit updates them, resolving these deprecation warnings: rstgen.nim(766, 12) Warning: use `delete(s, first..last)`; delete is deprecated [Deprecated] strutils.nim(1651, 19) Warning: use `delete(s, first..last)`; delete is deprecated [Deprecated] strutils.nim(1679, 7) Warning: use `delete(s, first..last)`; delete is deprecated [Deprecated] strutils.nim(2472, 7) Warning: use `delete(s, first..last)`; delete is deprecated [Deprecated] Before this commit: - `trimZeros` called `s.delete(i+1, i)` for an input that lacks a trailing zero (like "1.23"). - `removePrefix*(s: var string, prefix: string)` called `s.delete(0, -1)` when the prefix was the empty string. which did not modify `s`, nor raise an error. But the newer slice `delete` raises an `IndexDefect` when the start of the slice is greater than the end, so we avoid calling the new `delete` for such a case. Recall that exceptions inheriting from `system.Defect` are not tracked with the `.raises: []` exception tracking mechanism [1], so this commit does not break existing code like: proc foo {.raises: [].} = var s = "abc1.20" s.removePrefix("abc") s.trimZeros() doAssert s == "1.2" The `strutils.delete` deprecation was motivated by a problem with `system.delete` [2][3]: `system.delete` had surprising behavior when the index passed to it was out of bounds (it would delete the last entry then). Compile with `-d:nimStrictDelete` so that an index error is produced instead. Be aware however that your code might depend on this quirky behavior so a review process is required on your part before you can use `-d:nimStrictDelete`. To make this review easier, use the `-d:nimAuditDelete` switch, which pretends that `system.delete` is deprecated so that it is easier to see where it was used in your code. `-d:nimStrictDelete` will become the default in upcoming versions. A similar deprecation happened with `sequtils.delete` [4], but that deprecated form is already not used in this repo. [1] https://github.com/nim-lang/Nim/blob/2dec69fe5aa6/doc/manual.md#exception-tracking [2] https://github.com/nim-lang/Nim/blob/2dec69fe5aa6/changelogs/changelog_1_6_0.md#system [3] https://github.com/nim-lang/Nim/commit/92cb76571432 [4] https://github.com/nim-lang/Nim/commit/1d6863a7899f
* fixes #19231; newFinalize doesn't work with ORC (#20291)ringabout2022-10-051-0/+18
| | | | | | | | | | | | | | | * fixes #19231; newFinalize doesn't work with ORC first make it pass tests * remove the tables dep creates a binding for finalized procs in order to handle the same symbols. It used to wrongly generat a new symbol id for the same symbol as the encountered one before * refactor and revert #14257 * de indentation * fixes tests; uses instantiated types
* add default field support for object in ARC/ORC (#20480)ringabout2022-10-046-2/+448
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fresh start * add cpp target * add result support * add nimPreviewRangeDefault * reduce * use orc * refactor common parts * add tuple support * add testcase for tuple * cleanup; fixes nimsuggest tests * there is something wrong with cpp * remove * add support for seqs * fixes style * addd initial distinct support * remove links * typo * fixes tuple defaults * add rangedefault * add cpp support * fixes one more bugs * add more hasDefaults * fixes ordinal types * add testcase for #16744 * add testcase for #3608 * fixes docgen * small fix * recursive * fixes * cleanup and remove tuple support * fixes nimsuggest * fixes generics procs * refactor * increases timeout * refactor hasDefault * zero default; disable i386 * add tuples back * fixes bugs * fixes tuple * add more tests * fix one more bug regarding tuples * more tests and cleanup * remove messy distinct types which must be initialized by original types * add tests * fixes zero default * fixes grammar * fixes tests * fixes tests * fixes tests * fixes comments * fixes and add testcase * undo default values for results Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>
* decrease iteration count of btree test (#20491)Bung2022-10-041-1/+1
| | | disable btree test
* [ARC] fixes #18645; C Compiler error when initializing {.global.} with a ↵ringabout2022-10-031-0/+18
| | | | | | | | | | block (#19953) * fixes #18645; C Compiler error when initializing {.global.} with a block: * arguably cleaner solution Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com> Co-authored-by: Araq <rumpf_a@web.de>
* close #11415; add testcase (#20486)ringabout2022-10-031-0/+25
|
* pragma for sfCallsite instead of name check + better semantics, test (#20464)metagn2022-10-032-0/+37
| | | | | | | | | | | * pragma for sfCallsite instead of name check at every template definition Not documented because it seems to be for internal use? Should also make it possible to make comparisons and setops imports, but this doesn't have to be done. I can reuse a name like `cursor` for the pragma as well, added a new name just to be safe. * make sfCallsite recursive, add tests
* fixes nim check with orc (#20456)ringabout2022-10-024-1/+23
| | | | | | | | | | | * fixes nim check with orc * fixes tests * add tests * fixes tests * Update tests/arc/t20456.nim
* less test time costs (#20479)Bung2022-10-023-12/+8
|
* Fix #19224 For loops over a hardcoded empty array crash the compiler (#20476)Bung2022-10-011-0/+12
| | | | | * Fix #11684 For loops over a hardcoded empty array crash the compiler * Update t19224.nim
* move widestrs out of system (#20462)metagn2022-10-019-2/+26
| | | | | * move widestrs out of system * fix osproc
* fix #19678 Broken behavior with string ranges in case labels (#20475)Bung2022-10-011-0/+17
| | | | | | | | | * fix #19678 Broken behavior with string ranges in case labels * Update compiler/semtypes.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de> Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* new move analyser2 (#20471)Andreas Rumpf2022-10-018-15/+35
| | | | | | | | * produce better code for closure environment creation * new 'first write' analysis; * scope based move analyser * code cleanup Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
* closed ambiguous enum defaults to first overload (#20457)metagn2022-10-012-2/+10
| | | | | | | | | * closed ambiguous enum defaults to first overload * add warning * turn to hint * work around config
* remove hack for deprecated csize in compiler (#20463)metagn2022-10-011-5/+1
| | | | | * remove hack for deprecated csize in compiler * remove test