bugfix: proper return types for templates
This commit is contained in:
parent
a15475f582
commit
f7884717c1
6 changed files with 35 additions and 26 deletions
4
tests/accept/compile/ttemplreturntype.nim
Normal file
4
tests/accept/compile/ttemplreturntype.nim
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
|
||||
template `=~` (a: int, b: int): bool = false
|
||||
var foo = 2 =~ 3
|
||||
|
||||
|
|
@ -69,7 +69,9 @@ block countTableTest1:
|
|||
t.inc("12", 2)
|
||||
t.inc("34", 1)
|
||||
assert t.largest()[0] == "90"
|
||||
|
||||
|
||||
for k, v in t.pairs:
|
||||
echo k, v
|
||||
t.sort()
|
||||
var i = 0
|
||||
for k, v in t.pairs:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue