[bugfix] system.nim: make pop work with --newruntime
This commit is contained in:
parent
7e4748beee
commit
280193cc07
1 changed files with 6 additions and 2 deletions
|
|
@ -3071,8 +3071,12 @@ proc pop*[T](s: var seq[T]): T {.inline, noSideEffect.} =
|
|||
assert a == @[1, 3, 5]
|
||||
|
||||
var L = s.len-1
|
||||
result = s[L]
|
||||
setLen(s, L)
|
||||
when defined(nimV2):
|
||||
result = move s[L]
|
||||
shrink(s, L)
|
||||
else:
|
||||
result = s[L]
|
||||
setLen(s, L)
|
||||
|
||||
proc `==`*[T: tuple|object](x, y: T): bool =
|
||||
## Generic ``==`` operator for tuples that is lifted from the components.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue