diff options
-rw-r--r-- | lib/system.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/system.nim b/lib/system.nim index 65b633266..3d7d4bd28 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -3042,7 +3042,7 @@ template spliceImpl(s, a, L, b: expr): stmt {.immediate.} = # fill the hole: for i in 0 .. <b.len: s[i+a] = b[i] -when hasAlloc: +when hasAlloc or defined(nimscript): proc `[]`*(s: string, x: Slice[int]): string {.inline.} = ## slice operation for strings. result = s.substr(x.a, x.b) |