summary refs log tree commit diff stats
path: root/tests/views/tsplit_into_seq.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2020-09-29 23:42:38 +0200
committerGitHub <noreply@github.com>2020-09-29 23:42:38 +0200
commit4058801607b37fa707eb1b41d129ce74557eccac (patch)
tree02a69650508afc45747f425fec37268c08261bb2 /tests/views/tsplit_into_seq.nim
parentf8866598e7e0226aac7a6720adf4440278f9508d (diff)
downloadNim-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.nim5
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)