summary refs log tree commit diff stats
path: root/tests/effects/tstrict_funcs.nim
Commit message (Collapse)AuthorAgeFilesLines
* make strict funcs analysis smarter (#18219)Andreas Rumpf2021-06-091-0/+17
| | | | | | | * make strict funcs analysis smarter: varParam[i] = v is different from varParam[i][] = v * added a test case * Update compiler/varpartitions.nim Co-authored-by: Clyybber <darkmine956@gmail.com>
* strictFuncs+views: add test that imports stdlib modules (#16878)ee72021-02-031-12/+0
| | | | | | | | | | | | | | | This commit attempts to improve testing of strictFuncs and views, and prevent regressions like #16873 (resolved by 0b01eddace6a). We previously only explicitly tested strictFuncs and views with a smaller number of stdlib modules, mostly in: - tests/effects/tstrict_funcs.nim - tests/views/tcan_compile_nim.nim Note that this commit leaves the `pegs` module commented out; it cannot currently be compiled with `--experimental:views` (see #16892). Note also that this commit is not sufficient to test strictFuncs and views, but it does detect a subset of problems.
* critbits: fix error from strictFuncs (#16877)ee72021-02-011-0/+1
| | | | | | | | | Previously, compiling a file containing just `import critbits` with `nim c --experimental:strictFuncs` would produce the following error: critbits.nim(529, 6) Error: 'toCritBitTree' can have side effects This was introduced by 2aed4186989e (#16564). Fixes: #16873
* rationals.nim: Use `func` everywhere (#16302)ee72020-12-091-0/+1
|
* sequtils.nim: Use `func` (#16293)ee72020-12-091-0/+1
| | | | | | | | | * sequtils.nim: proc -> func * sequtils.nim: proc -> func in links * sequtils.nim: proc -> func in non-link doc comments * test: add `sequtils` to strictFuncs test
* complex.nim: Use `func` everywhere (#16294)ee72020-12-091-0/+1
|
* math.nim: Use `func` everywhere (#16285)ee72020-12-071-1/+9
| | | | | | | | | | | * math.nim: procs with {.noSideEffect} -> funcs * math.nim: procs without {.noSideEffect.} -> funcs * math.nim: proc -> func in links * math.nim: proc -> func in doc comments * test: add `math` to strictFuncs test
* strutils.nim: Use `func` everywhere (#16281)ee72020-12-071-2/+2
| | | | | | | | | | | | | * strutils.nim: procs with {.noSideEffect.} -> func * strutils.nim: procs without {.noSideEffect.} -> func * strutils.nim: proc -> func for links * strutils.nim: proc -> func in doc comments * test: add strutils to strictFuncs test * test: proc -> func in errmsg test
* fix #15851 (#15852)flywind2020-11-061-1/+1
| | | | | * fix #15851 * {.cast(noSideEffect).}
* fix #15756 (#15761)cooldome2020-10-281-0/+12
| | | | | * fix #15756 * simplify test
* use func in uri module (#15486)flywind2020-10-051-1/+1
|
* views: yet another bugfix (#15447)Andreas Rumpf2020-10-011-1/+1
| | | | | | | * views: yet another bugfix * views: extended the spec * views: take into account potential hidden mutations via proc calls
* refactoring, fixes yet another strictFuncs regression (#15446)Andreas Rumpf2020-10-011-0/+17