small bugfixes to make more tests green
This commit is contained in:
parent
84c473a890
commit
1f6725e59e
11 changed files with 40 additions and 11 deletions
|
|
@ -3,7 +3,8 @@ var
|
|||
lastId = 0
|
||||
|
||||
template genId*: expr =
|
||||
inc(bind lastId)
|
||||
bind lastId
|
||||
inc(lastId)
|
||||
lastId
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
10
tests/reject/tmissingnl.nim
Normal file
10
tests/reject/tmissingnl.nim
Normal 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] = @[]
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue