diff options
author | Araq <rumpf_a@web.de> | 2011-04-22 10:53:43 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2011-04-22 10:53:43 +0200 |
commit | 8dda362fa67bcf75a24f2a60b7a124fdea319a64 (patch) | |
tree | 7e43b56fd522040989c5c64ddfef9ffab08b8594 /tests/accept/compile | |
parent | 1985ac69951932d2882b63b13f9dcd853dd80c43 (diff) | |
download | Nim-8dda362fa67bcf75a24f2a60b7a124fdea319a64.tar.gz |
slices are first class citizens
Diffstat (limited to 'tests/accept/compile')
-rw-r--r-- | tests/accept/compile/ttableconstr.nim | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/accept/compile/ttableconstr.nim b/tests/accept/compile/ttableconstr.nim new file mode 100644 index 000000000..9433e9985 --- /dev/null +++ b/tests/accept/compile/ttableconstr.nim @@ -0,0 +1,16 @@ +# 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 + |