diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2020-09-29 23:42:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-29 23:42:38 +0200 |
commit | 4058801607b37fa707eb1b41d129ce74557eccac (patch) | |
tree | 02a69650508afc45747f425fec37268c08261bb2 /tests/views/tsplit_into_seq.nim | |
parent | f8866598e7e0226aac7a6720adf4440278f9508d (diff) | |
download | Nim-4058801607b37fa707eb1b41d129ce74557eccac.tar.gz |
spec for view types (#15424)
* spec for view types * spec additions * refactoring; there are two different kinds of views * refactorings and spec additions * enforce that view types are initialized * enforce borrowing from the first formal parameter * enforce lifetimes for borrowing of locals * typo in the manual * clarify in the implementation what a borrow operation really is
Diffstat (limited to 'tests/views/tsplit_into_seq.nim')
-rw-r--r-- | tests/views/tsplit_into_seq.nim | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/views/tsplit_into_seq.nim b/tests/views/tsplit_into_seq.nim index 409451601..49968f4c2 100644 --- a/tests/views/tsplit_into_seq.nim +++ b/tests/views/tsplit_into_seq.nim @@ -23,9 +23,8 @@ proc split*(s: string, seps: set[char] = Whitespace, while last < len(s) and s[last] notin seps: inc(last) if splits == 0: last = len(s) - {.noSideEffect.}: - result.add toOpenArray(s, first, last-1) - result.add toOpenArray(s, first, last-1) + result.add toOpenArray(s, first, last-1) + result.add toOpenArray(s, first, last-1) if splits == 0: break dec(splits) inc(last) |