-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
strictFuncs: cannot import critbits
#16873
Comments
ee7
added a commit
to ee7/Nim
that referenced
this issue
Jan 30, 2021
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 2aed418 (nim-lang#16564). Fixes: nim-lang#16873
This was referenced Jan 30, 2021
ee7
added a commit
to ee7/Nim
that referenced
this issue
Feb 1, 2021
This commit attempts to improve testing of strictFuncs and views, and prevent regressions like nim-lang#16873 (resolved by 0b01edd). 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 nim-lang#16892). Note also that this commit is not sufficient to test strictFuncs and views, but it does detect a subset of problems.
Araq
pushed a commit
that referenced
this issue
Feb 3, 2021
This commit attempts to improve testing of strictFuncs and views, and prevent regressions like #16873 (resolved by 0b01edd). 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.
ardek66
pushed a commit
to ardek66/Nim
that referenced
this issue
Mar 26, 2021
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 2aed418 (nim-lang#16564). Fixes: nim-lang#16873
ardek66
pushed a commit
to ardek66/Nim
that referenced
this issue
Mar 26, 2021
This commit attempts to improve testing of strictFuncs and views, and prevent regressions like nim-lang#16873 (resolved by 0b01edd). 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 nim-lang#16892). Note also that this commit is not sufficient to test strictFuncs and views, but it does detect a subset of problems.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example
Compile the below with
nim c --experimental:strictFuncs
import critbits
Current Output
Expected Output
No error.
Additional Information
toCritBitTree
is defined here:Nim/lib/pure/collections/critbits.nim
Lines 521 to 534 in 111092e
Nim version
This issue occurs with the latest devel commit (111092e), but not in Nim 1.4.2.
Edit: I have confirmed that this issue was introduced by 2aed418.
The text was updated successfully, but these errors were encountered: