diff options
Diffstat (limited to 'tests/trmacros/tor.nim')
-rw-r--r-- | tests/trmacros/tor.nim | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/trmacros/tor.nim b/tests/trmacros/tor.nim index 6b4e71216..9defc4d1b 100644 --- a/tests/trmacros/tor.nim +++ b/tests/trmacros/tor.nim @@ -1,7 +1,7 @@ discard """ output: ''' 3 -0 +30 true ''' """ @@ -15,7 +15,9 @@ echo z template arithOps: untyped = (`+` | `-` | `*`) -template testOr{ (arithOps{f})(a, b) }(a, b, f: untyped): untyped = f(a mod 10, b) +template testOr{ (arithOps{f})(a, b) }(a, b, f: untyped): untyped = + {.noRewrite.}: + f(a mod 10, b) let xx = 10 echo 10*xx |