mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-03 11:42:33 +00:00
slight change in the spec of unary '..'
This commit is contained in:
@@ -128,9 +128,7 @@ proc `..`*[T](a, b: T): TSlice[T] {.noSideEffect, inline.} =
|
||||
result.b = b
|
||||
|
||||
proc `..`*[T](b: T): TSlice[T] {.noSideEffect, inline.} =
|
||||
## `slice`:idx: operator that constructs an interval ``[low(T), b]``
|
||||
when int(low(b)) == low(int): result.a = 0
|
||||
else: result.a = low(b)
|
||||
## `slice`:idx: operator that constructs an interval ``[default(T), b]``
|
||||
result.b = b
|
||||
|
||||
proc contains*[T](s: TSlice[T], value: T): bool {.noSideEffect, inline.} =
|
||||
|
||||
Reference in New Issue
Block a user