sequtils: fix errors from strictFuncs
use
#18998
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Nim 1.4.x compiled the below code without error when using
--experimental:strictFuncs
However, since 2020-12-09, devel Nim produced errors like
This commit reverts some
proc
tofunc
changes so that code that:repeat
,zip
, orunzip
ref
can once again be compiled with
strictFuncs
. Otherwise, a user mightbe forced to drop or alter their
strictFuncs
use when upgrading fromNim 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 typescontaining
ref
.The original batch of
proc
tofunc
changes insequtils.nim
was incommit 6f57eba, which was partially reverted in 38eb021.
See also: #16305 (comment)