diff options
-rw-r--r-- | lib/pure/collections/queues.nim | 3 | ||||
-rw-r--r-- | tests/errmsgs/tshow_asgn.nim | 2 | ||||
-rw-r--r-- | tests/exprs/texprstmt.nim | 2 | ||||
-rw-r--r-- | tests/iter/tconcat.nim | 2 |
4 files changed, 4 insertions, 5 deletions
diff --git a/lib/pure/collections/queues.nim b/lib/pure/collections/queues.nim index 401422162..ce792d6da 100644 --- a/lib/pure/collections/queues.nim +++ b/lib/pure/collections/queues.nim @@ -198,9 +198,8 @@ when isMainModule: assert($q == "[4, 56, 6, 789]") assert q[0] == q.front and q.front == 4 - assert q[^1] == q.back and q.back == 789 q[0] = 42 - q[^1] = 7 + q[q.len - 1] = 7 assert 6 in q and 789 notin q assert q.find(6) >= 0 diff --git a/tests/errmsgs/tshow_asgn.nim b/tests/errmsgs/tshow_asgn.nim index 250f786e2..cdd325b93 100644 --- a/tests/errmsgs/tshow_asgn.nim +++ b/tests/errmsgs/tshow_asgn.nim @@ -7,7 +7,7 @@ discard """ # bug #5430 -proc random*[T](x: Slice[T]): T = +proc random*[T](x: Slice[T, T]): T = ## For a slice `a .. b` returns a value in the range `a .. b-1`. result = int(x.b - x.a) + x.a diff --git a/tests/exprs/texprstmt.nim b/tests/exprs/texprstmt.nim index 0e92702e8..6c9759cf5 100644 --- a/tests/exprs/texprstmt.nim +++ b/tests/exprs/texprstmt.nim @@ -1,6 +1,6 @@ discard """ line: 10 - errormsg: "expression 'result[1 .. -(len(result), 1)]' is of type 'string' and has to be discarded" + errormsg: "expression 'result[1 .. BackwardsIndex(1)]' is of type 'string' and has to be discarded" """ # bug #578 diff --git a/tests/iter/tconcat.nim b/tests/iter/tconcat.nim index 477ac5e26..94a89b57e 100644 --- a/tests/iter/tconcat.nim +++ b/tests/iter/tconcat.nim @@ -9,7 +9,7 @@ discard """ 23''' """ -proc toIter*[T](s: Slice[T]): iterator: T = +proc toIter*[T](s: Slice[T, T]): iterator: T = iterator it: T {.closure.} = for x in s.a..s.b: yield x |