fixes #798
This commit is contained in:
parent
5d6053173a
commit
7c065bfadf
12 changed files with 10 additions and 2 deletions
10
tests/trmacros/tnoendlessrec.nim
Normal file
10
tests/trmacros/tnoendlessrec.nim
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
discard """
|
||||
output: "4"
|
||||
"""
|
||||
|
||||
# test that an endless recursion is avoided:
|
||||
|
||||
template optLen{len(x)}(x: expr): expr = len(x)
|
||||
|
||||
var s = "lala"
|
||||
echo len(s)
|
||||
Loading…
Add table
Add a link
Reference in a new issue