Remove expr/stmt (#5857)

This commit is contained in:
Arne Döring 2017-07-25 09:28:23 +02:00 • committed by Andreas Rumpf
commit 000b8afd26
168 changed files with 497 additions and 529 deletions

View file

@ -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