summary refs log tree commit diff stats
path: root/tests/accept/compile
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2011-04-22 10:53:43 +0200
committerAraq <rumpf_a@web.de>2011-04-22 10:53:43 +0200
commit8dda362fa67bcf75a24f2a60b7a124fdea319a64 (patch)
tree7e43b56fd522040989c5c64ddfef9ffab08b8594 /tests/accept/compile
parent1985ac69951932d2882b63b13f9dcd853dd80c43 (diff)
downloadNim-8dda362fa67bcf75a24f2a60b7a124fdea319a64.tar.gz
slices are first class citizens
Diffstat (limited to 'tests/accept/compile')
-rw-r--r--tests/accept/compile/ttableconstr.nim16
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
+