small bugfixes to make more tests green

This commit is contained in:
Araq 2011-11-02 02:28:18 +01:00
commit 1f6725e59e
11 changed files with 40 additions and 11 deletions

View file

@ -3,7 +3,8 @@ var
lastId = 0
template genId*: expr =
inc(bind lastId)
bind lastId
inc(lastId)
lastId

View file

@ -7,7 +7,8 @@ discard """
proc p1(x: int8, y: int): int = return x + y
template tempBind(x, y: expr): expr =
bind p1(x, y)
bind p1
p1(x, y)
proc p1(x: int, y: int8): int = return x - y

View file

@ -5,6 +5,8 @@ discard """
import unidecode
assert unidecode("\\x53\\x17\\x4E\\xB0") == "Bei Jing"
loadUnidecodeTable("lib/pure/unidecode/unidecode.dat")
assert unidecode("\x53\x17\x4E\xB0") == "Bei Jing"
echo unidecode("Äußerst")

View file

@ -9,7 +9,7 @@ proc p1(x: int8, y: int): int = return x + y
proc p1(x: int, y: int8): int = return x - y
template tempBind(x, y: expr): expr =
bind p1(x, y) #ERROR_MSG ambiguous call
(bind p1(x, y)) #ERROR_MSG ambiguous call
echo tempBind(1'i8, 2'i8)

View file

@ -0,0 +1,10 @@
discard """
file: "tmissingnl.nim"
line: 7
errormsg: "newline expected, but found 'keyword var'"
"""
import strutils var s: seq[int] = @[0, 1, 2, 3, 4, 5, 6]
#s[1..3] = @[]