system.nim: avoid 'cannot prove init' warnings for the '..' constructors
This commit is contained in:
parent
6a5c74722e
commit
7b31a81d45
1 changed files with 2 additions and 3 deletions
|
|
@ -407,12 +407,11 @@ proc `..`*[T, U](a: T, b: U): HSlice[T, U] {.noSideEffect, inline, magic: "DotDo
|
|||
## and `b` are inclusive. Slices can also be used in the set constructor
|
||||
## and in ordinal case statements, but then they are special-cased by the
|
||||
## compiler.
|
||||
result.a = a
|
||||
result.b = b
|
||||
result = HSlice[T, U](a: a, b: b)
|
||||
|
||||
proc `..`*[T](b: T): HSlice[int, T] {.noSideEffect, inline, magic: "DotDot".} =
|
||||
## unary `slice`:idx: operator that constructs an interval ``[default(int), b]``
|
||||
result.b = b
|
||||
result = HSlice[int, T](a: 0, b: b)
|
||||
|
||||
when not defined(niminheritable):
|
||||
{.pragma: inheritable.}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue