mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-22 00:41:28 +00:00
fix @ for openarray on nimscript [backport:2.2] (#25641)
Even on nimscript, the `else` branch of the `when nimvm` below compiles and gives an "undeclared identifier: copyMem" error. Regression since #25064.
This commit is contained in:
@@ -1469,7 +1469,7 @@ when defined(nimHasTopDownInference):
|
||||
## This is not as efficient as turning a fixed length array into a sequence
|
||||
## as it always copies every element of `a`.
|
||||
let sz = a.len
|
||||
when supportsCopyMem(T) and not defined(js):
|
||||
when supportsCopyMem(T) and not defined(js) and not defined(nimscript):
|
||||
result = newSeqUninit[T](sz)
|
||||
when nimvm:
|
||||
for i in 0..sz-1: result[i] = a[i]
|
||||
|
||||
Reference in New Issue
Block a user