This commit is contained in:
Araq 2015-04-22 11:32:43 +02:00
commit 54515241e3
2 changed files with 40 additions and 9 deletions

24
tests/js/tstringitems.nim Normal file
View file

@ -0,0 +1,24 @@
discard """
output: '''Hello
Hello'''
"""
# bug #2581
const someVars = [ "Hello" ]
var someVars2 = [ "Hello" ]
proc getSomeVar: string =
for i in someVars:
if i == "Hello":
result = i
break
proc getSomeVar2: string =
for i in someVars2:
if i == "Hello":
result = i
break
echo getSomeVar()
echo getSomeVar2()