diff options
author | Araq <rumpf_a@web.de> | 2015-09-08 10:37:34 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2015-09-08 10:37:34 +0200 |
commit | 5eaf68882ec87160033a4707378967188b642c3d (patch) | |
tree | 89f953fa97c583123df4cef3aeb784cad27b9ca5 | |
parent | f1a17990be24138fe26f93977735322b31ac3c2f (diff) | |
download | Nim-5eaf68882ec87160033a4707378967188b642c3d.tar.gz |
fixes #3300
-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) |