summary refs log tree commit diff stats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* remove exception (#18906)flywind2021-10-221-0/+7
|
* fix parsesql.treeRepr when nil is in input (#18974)Andrey Makarov2021-10-171-0/+34
| | | | | * fix parsesql.treeRepr when nil is in input * return newNode(nkNone) as default value, not nil
* sequtils: fix errors from `strictFuncs` use (#18998)ee72021-10-161-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nim 1.4.x compiled the below code without error when using `--experimental:strictFuncs` import std/sequtils type Foo = ref object let foo1 = Foo() let foo2 = Foo() let foos = @[foo1, foo2] let fooTuples = @[(foo1, 1), (foo2, 2)] discard repeat(foo1, 3) discard zip(foos, foos) discard unzip(fooTuples) However, since 2020-12-09, devel Nim produced errors like /tmp/bar.nim(11, 15) template/generic instantiation of `repeat` from here /foo/nim/pure/collections/sequtils.nim(172, 6) Error: 'repeat' can have side effects an object reachable from 'x' is potentially mutated /foo/nim/pure/collections/sequtils.nim(183, 15) the mutation is here /foo/nim/pure/collections/sequtils.nim(183, 15) is the statement that connected the mutation to the parameter This commit reverts some `proc` to `func` changes so that code that: - calls `repeat`, `zip`, or `unzip` - and instantiates them with types containing `ref` can once again be compiled with `strictFuncs`. Otherwise, a user might be forced to drop or alter their `strictFuncs` use when upgrading from Nim 1.4.x, or when writing new code that uses these procedures (at least for now, with the current `strictFuncs` implementation). This commit also adds tests to assert that the remaining funcs in this module can be compiled with `strictFuncs` when used with types containing `ref`. The original batch of `proc` to `func` changes in `sequtils.nim` was in commit 6f57ebae349f, which was partially reverted in 38eb021f8158. See also: https://github.com/nim-lang/Nim/issues/16305
* try to fix broken ssl test (#18991)Miran2021-10-141-1/+1
|
* Removes deprecated {.injectStmt.}. Fixes #18666 (#18984)Dominik Picheta2021-10-131-51/+0
|
* fixes a regression caused by overloadable enums even though they're opt-in ↵Andreas Rumpf2021-10-072-0/+17
| | | | (#18970)
* Fixed `strictFuncs` support for `std/pegs` (#18951)quantimnot2021-10-071-1/+1
| | | | | | | | | | | | | | | | | * Fixed `strictFuncs` support for `std/pegs` Enabled `std/pegs` in the `strictFuncs` import test. Fixes #18057 Fixes #16892 See #18111 * Rebased from `devel` * Conditionally compile `std/pegs` in `koch` This is for supporting `csources` bootstrap. Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
* rst: minor fixes (#18960)Andrey Makarov2021-10-061-1/+1
|
* enable tests for #2710 (#18961)flywind2021-10-061-2/+2
|
* rename nimEnableHashRef [backport] (#18941)flywind2021-10-043-2/+1
| | | | | | * rename nimEnableHashRef [backport] * Apply suggestions from code review Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* Add support for `strictEffects` to `std/pegs` (#18949)quantimnot2021-10-041-0/+3
| | | | | | | * Add support for `strictEffects` to `std/pegs` * Fixed support of older Nim versions Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
* rename nimLegacyJsonutilsHoleyEnum [backport] (#18938)flywind2021-10-011-1/+3
| | | | | * enable nimPreviewJsonutilsHoleyEnum [backport] * docuement nimPreviewJsonutilsHoleyEnum
* close #17319; add testcase (#18934)flywind2021-10-011-0/+19
|
* alternative to #18918 (#18927)flywind2021-09-301-0/+9
| | | | | * fix #16558 * add testcase
* Alternative to #18928 (#18931)Jason Beetham2021-09-301-1/+51
| | | | | * fixed #18841 * Added test
* envPairs works in vm, nims (#18615)Timothee Cour2021-09-293-34/+16
| | | | | * envPairs works in vm, nims * fixup
* fixes 'lent T' inside object constructor [backport] (#18911)Andreas Rumpf2021-09-271-0/+17
| | | | | * fixes 'lent T' inside object constructor [backport] * progress
* closes #18690; make view types stricter [backport] (#18891)Andreas Rumpf2021-09-241-1/+12
| | | | | * closes #18690 * don't allow capturing of view types [backport]
* correct effect tracking for .borrowed procs [backport] (#18882)Andreas Rumpf2021-09-231-1/+1
| | | | | | | | | | | * correct effect tracking for .borrowed procs [backport] * progress * fix error message in a test * correctly fix it Co-authored-by: narimiran <narimiran@disroot.org>
* closes #16132 [backport] (#18880)Andreas Rumpf2021-09-221-1/+13
| | | | | * closes #16132 [backport] * fixes #16132 [backport]
* fix #18844 (#18851)flywind2021-09-201-1/+21
|
* fixes #18847 [backport] (#18870)Andreas Rumpf2021-09-201-0/+4
|
* fixes #18858 [backport] (#18868)Andreas Rumpf2021-09-191-0/+1
| | | | | | | * fixes #18858 [backport] * ensure async tests work with --experimental:strictEffects [backport] * ensure async tests work with --experimental:strictEffects [backport]
* semtypinst: don't wrap type nodes from expressions in static[T] (#18860)alaviss2021-09-171-0/+17
|
* Fixed borrowing dot from aliases (#18854)Jason Beetham2021-09-161-1/+37
|
* fix #10128 (#18852)flywind2021-09-141-0/+18
|
* add testcase for #7308 (#18849)flywind2021-09-142-11/+43
|
* Dotborrow now works with generic distincts (#18848)Jason Beetham2021-09-142-4/+33
|
* Fixed #18838 (#18841) [backport]Jason Beetham2021-09-131-1/+35
|
* Generic pointer procs now error if no types supplied (#18832)Jason Beetham2021-09-111-0/+28
| | | | | | | * more precise logic for pointer procs * added test for generic pointer procs * Fixed generic getting bracket expr if erroring
* Fixed type inference for 'set` and 'tuple' (#18827)Jason Beetham2021-09-111-0/+22
| | | | | | | * improved built in typeclass inference * Smarter logic to fit node * Forgot the untyped check
* fix CI failure(upstream changes) (#18820)flywind2021-09-081-1/+1
| | | | | | | | | * fix upstream changes * Update tests/js/tunittest_error2.nim Co-authored-by: flywind <xzsflywind@gmail.com> Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* Fix subranges of distinct types (#18816) [backport]Jason Beetham2021-09-071-0/+14
|
* Fixes implicit and explicit generics in procedures (#18808)Jason Beetham2021-09-061-0/+45
| | | | | | | | | | | * Fixes implicit and explicit generics * moved block logic into 'maybeInstantiateGeneric' * Added more tests * Update compiler/semexprs.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fixes #12642 (#18811)Andreas Rumpf2021-09-061-0/+20
| | | | | | | | | | | | | | | | | | | * fixes #12642 * update important packages; refs #18804 * fixes #18805; refs #18806 * fixes a regression * Update testament/categories.nim Co-authored-by: flywind <xzsflywind@gmail.com> * progress * progress Co-authored-by: flywind <xzsflywind@gmail.com>
* '[]' can now be used for iterators (#18814)Jason Beetham2021-09-061-0/+14
|
* fixes #14165, fixes #18739, fix the second example of #6269 (#18812)Andreas Rumpf2021-09-061-0/+50
|
* Fix recursive generic typed defs (#18809)Jason Beetham2021-09-061-0/+12
|
* unicode operator bugfixes (#18802)Andreas Rumpf2021-09-041-1/+3
|
* fixes #16246 (#18800)Andreas Rumpf2021-09-041-0/+11
|
* remove channels (#18801)flywind2021-09-043-422/+0
| | | | | * remove channels * test
* implements https://github.com/nim-lang/RFCs/issues/407 (#18793)Andreas Rumpf2021-09-031-0/+9
|
* implemented Unicode operators (#18789)Andreas Rumpf2021-09-032-0/+15
| | | | | | | | | | | | | | | * implemented Unicode operators; refs https://github.com/nim-lang/RFCs/issues/388 * bugfix * better test * arguably more elegant implementation * Update changelog.md Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* fixes #18769 (#18790)Andreas Rumpf2021-09-031-1/+10
|
* fixes #16325 [backport:1.4] (#18784)Andreas Rumpf2021-09-021-0/+20
|
* sequtils now support strict effect tracking (#18782)Andreas Rumpf2021-09-021-0/+5
|
* Fix initrand to avoid random number sequences overlapping (#18744)Tomohiro2021-09-022-4/+30
| | | | | | | | | | | | | | | | | | | | | | | * Fix initrand to avoid random number sequences overlapping * Minor fix * Fix compile error on js backend * Disable new test for js backend * Minor fix * tempfiles module uses random.initRand() * Remove unused module import from lib/std/tempfiles.nim * Initialize baseState in initRand() * Run tests/stdlib/trandom.nim from tests/test_nimscript.nims * baseState is initialized only with sysrand.urandom and quit if failed * Add comments
* strict effects (#18777)Andreas Rumpf2021-09-0210-22/+124
| | | | | | | | | | | | | | | | | * fixes #17369 * megatest is green for --cpu:arm64 * docgen output includes more tags/raises * implemented 'effectsOf' * algorithm.nim: uses new effectsOf annotation * closes #18376 * closes #17475 * closes #13905 * allow effectsOf: [a, b] * added a test case * parameters that are not ours cannot be declared as .effectsOf * documentation * manual: added the 'sort' example * bootstrap with the new better options
* fix #9778 (pairs iterator calling a helper proc with tuple return type will ↵flywind2021-09-021-0/+256
| | | | | | | | | | | cut the iterator yield into half) (#18767) * test someSymFromImportTable * Update compiler/lookups.nim * test nkTupleConstr * use isConstExpr * add tests * add comments and todo * use todo
* Implement RFC-413 (#18749)Juan Carlos2021-08-261-1/+0
| | | | | | | | | | | | | | | | | | | | | | * Implement RFC 413 * Implement RFC 413 * Implement RFC 413 * Implement RFC 413 * https://github.com/nim-lang/Nim/pull/18749#discussion_r696320995 * Update lib/js/dom_extensions.nim Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> * Update lib/js/dom_extensions.nim * https://github.com/nim-lang/Nim/pull/18749#discussion_r696913310 Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: Andreas Rumpf <rumpf_a@web.de>