diff options
Diffstat (limited to 'tests/trmacros/tdisallowif.nim')
-rw-r--r-- | tests/trmacros/tdisallowif.nim | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/trmacros/tdisallowif.nim b/tests/trmacros/tdisallowif.nim index 18dfd1c82..8d83f6ddf 100644 --- a/tests/trmacros/tdisallowif.nim +++ b/tests/trmacros/tdisallowif.nim @@ -1,7 +1,6 @@ discard """ + errormsg: "usage of 'disallowIf' is an {.error.} defined at tdisallowif.nim(10, 1)" line: 24 - errormsg: "usage of 'disallowIf' is a user-defined error" - disabled: true """ template optZero{x+x}(x: int): int = x*3 @@ -11,7 +10,7 @@ template optSubstr1{x = substr(x, 0, b)}(x: string, b: int) = setlen(x, b+1) template disallowIf{ if cond: action else: action2 -}(cond: bool, action, action2: stmt) {.error.} = action +}(cond: bool, action, action2: typed) {.error.} = action var y = 12 echo y+y |