term rewriting improvements
This commit is contained in:
parent
355ae07b8f
commit
b64eeeb430
18 changed files with 284 additions and 144 deletions
|
|
@ -4,8 +4,8 @@ discard """
|
|||
"""
|
||||
|
||||
template optZero{x+x}(x: int): int = x*3
|
||||
template andthen{x*3}(x: int): int = x*4
|
||||
template optSubstr1{x = substr(x, a, b)}(x: string, a, b: int) = setlen(x, b+1)
|
||||
template andthen{`*`(x,3)}(x: int): int = x*4
|
||||
template optSubstr1{x = substr(x, 0, b)}(x: string, b: int) = setlen(x, b+1)
|
||||
|
||||
template disallowIf{
|
||||
if cond: action
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
discard """
|
||||
file: "ttypenoval.nim"
|
||||
line: 38
|
||||
errormsg: "type mismatch: got (typedesc{int}) but expected 'int'"
|
||||
errormsg: "type mismatch: got (typedesc[int]) but expected 'int'"
|
||||
"""
|
||||
|
||||
# A min-heap.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue