diff options
author | Arne Döring <arne.doering@gmx.net> | 2017-07-25 09:28:23 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2017-07-25 09:28:23 +0200 |
commit | 000b8afd26fa16684a116d9afe798ea94df9c270 (patch) | |
tree | e5295df748b90c5027e44adfa3a442031534572c /tests/compiles | |
parent | 52ff244d5d2775fa4d13f4e2b9a996f411281312 (diff) | |
download | Nim-000b8afd26fa16684a116d9afe798ea94df9c270.tar.gz |
Remove expr/stmt (#5857)
Diffstat (limited to 'tests/compiles')
-rw-r--r-- | tests/compiles/tcompiles.nim | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/compiles/tcompiles.nim b/tests/compiles/tcompiles.nim index b3d9c17ce..1a21315c8 100644 --- a/tests/compiles/tcompiles.nim +++ b/tests/compiles/tcompiles.nim @@ -1,13 +1,15 @@ # test the new 'compiles' feature: -template supports(opr, x: expr): bool {.immediate.} = +template supports(opr, x: untyped): bool = compiles(opr(x)) or compiles(opr(x, x)) -template ok(x: expr): stmt = - static: assert(x) +template ok(x) = + static: + assert(x) -template no(x: expr): stmt = - static: assert(not x) +template no(x) = + static: + assert(not x) type TObj = object |