diff options
author | Araq <rumpf_a@web.de> | 2019-02-20 12:28:22 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2019-02-20 12:28:22 +0100 |
commit | 7b31a81d4577a5d293e4f5bfa591848d93eb8320 (patch) | |
tree | c9cd65df14a2c3da1b8b9ed60b5bcffb3a935c9b /lib/system.nim | |
parent | 6a5c74722e6c9620154da2242e98807638aa27ca (diff) | |
download | Nim-7b31a81d4577a5d293e4f5bfa591848d93eb8320.tar.gz |
system.nim: avoid 'cannot prove init' warnings for the '..' constructors
Diffstat (limited to 'lib/system.nim')
-rw-r--r-- | lib/system.nim | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/system.nim b/lib/system.nim index 268d6ccd3..e8a04ce9d 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -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.} |