diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2022-09-30 18:38:25 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-30 12:38:25 +0200 |
commit | ae050b05e9ce6f4e356c46de8722724a2f706e18 (patch) | |
tree | d042b09c9416ea2ef63faf139eb6e7297b0419e7 /lib/system/indices.nim | |
parent | 3e43ea3384acd666196bbcdc6029741df9b6e325 (diff) | |
download | Nim-ae050b05e9ce6f4e356c46de8722724a2f706e18.tar.gz |
koch boot compiler with orc (#20467)
* koch boot compiler with orc * use orc * workaround bugs * move it * move the data
Diffstat (limited to 'lib/system/indices.nim')
-rw-r--r-- | lib/system/indices.nim | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/system/indices.nim b/lib/system/indices.nim index 40e7419f6..3f90d4399 100644 --- a/lib/system/indices.nim +++ b/lib/system/indices.nim @@ -55,7 +55,7 @@ template `[]=`*(s: string; i: int; val: char) = arrPut(s, i, val) template `^^`(s, i: untyped): untyped = (when i is BackwardsIndex: s.len - int(i) else: int(i)) -template spliceImpl(s, a, L, b: untyped): untyped = +template spliceImpl(s, a, L, b: typed): untyped = # make room for additional elements or cut: var shift = b.len - max(0,L) # ignore negative slice size var newLen = s.len + shift @@ -147,7 +147,6 @@ proc `[]=`*[T; U, V: Ordinal](s: var seq[T], x: HSlice[U, V], b: openArray[T]) = var s = @"abcdefgh" s[1 .. ^2] = @"xyz" assert s == @"axyzh" - let a = s ^^ x.a let L = (s ^^ x.b) - a + 1 if L == b.len: |