Remove expr/stmt (#5857)
This commit is contained in:
parent
52ff244d5d
commit
000b8afd26
168 changed files with 497 additions and 529 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue