mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 17:34:43 +00:00
bugfix: system.& for sequences
This commit is contained in:
@@ -1454,9 +1454,9 @@ proc `&` *[T](x: seq[T], y: T): seq[T] {.noSideEffect.} =
|
||||
|
||||
proc `&` *[T](x: T, y: seq[T]): seq[T] {.noSideEffect.} =
|
||||
newSeq(result, y.len + 1)
|
||||
result[0] = x
|
||||
for i in 0..y.len-1:
|
||||
result[i] = y[i]
|
||||
result[y.len] = x
|
||||
result[i+1] = y[i]
|
||||
|
||||
when not defined(NimrodVM):
|
||||
when not defined(JS):
|
||||
|
||||
Reference in New Issue
Block a user