Files
Nim/tests/compile/ttableconstr.nim
2011-11-19 15:45:51 +01:00

17 lines
289 B
Nim
Executable File

# Test if the new table constructor syntax works:
template ignoreExpr(e: expr): stmt =
nil
# test first class '..' syntactical citizen:
ignoreExpr x <> 2..4
# test table constructor:
ignoreExpr({:})
ignoreExpr({2: 3, "key": "value"})
# NEW:
assert 56 in 50..100
assert 56 in ..60