term rewriting improvements
This commit is contained in:
parent
355ae07b8f
commit
b64eeeb430
18 changed files with 284 additions and 144 deletions
10
tests/patterns/tnoendlessrec.nim
Normal file
10
tests/patterns/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