Skip to content

Commit

Permalink
fixes #3300
Browse files Browse the repository at this point in the history
  • Loading branch information
Araq committed Sep 8, 2015
1 parent f1a1799 commit 5eaf688
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/system.nim
Expand Up @@ -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)
Expand Down

0 comments on commit 5eaf688

Please sign in to comment.