You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now calling for example .add() on a seq inside its own iterator scope will always result in a run time error. It is as sure to crash as assert(false). Yet sometimes this can go unnoticed in a branch. And right now, fixing this can be cumbersome since the error message also does not contain the line number.
Note that the index and value iterated over are already immutable inside an iterator scope, but what I ask is for the seq variable itself to also be immutable.
The text was updated successfully, but these errors were encountered:
Summary
Make seqs immutable in their own iterator scope.
Description
Right now calling for example .add() on a seq inside its own iterator scope will always result in a run time error. It is as sure to crash as assert(false). Yet sometimes this can go unnoticed in a branch. And right now, fixing this can be cumbersome since the error message also does not contain the line number.
Here is an example:
https://play.nim-lang.org/#ix=3uLg
Note that the index and value iterated over are already immutable inside an iterator scope, but what I ask is for the seq variable itself to also be immutable.
The text was updated successfully, but these errors were encountered: