summary refs log tree commit diff stats
path: root/tests/accept
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2011-06-06 08:45:11 +0200
committerAraq <rumpf_a@web.de>2011-06-06 08:45:11 +0200
commit42eb21be7b422b47732a56a1b8420b6f1b63f2c6 (patch)
treefdd97f56d6c4f88b23f6c38ebea2dde59e762516 /tests/accept
parent958961bd8d0bc699c6301984a706c5d182079c71 (diff)
downloadNim-42eb21be7b422b47732a56a1b8420b6f1b63f2c6.tar.gz
bugfix: generic instantiation across module boundaries
Diffstat (limited to 'tests/accept')
-rw-r--r--tests/accept/run/tlists.nim0
-rw-r--r--tests/accept/run/ttables.nim18
2 files changed, 18 insertions, 0 deletions
diff --git a/tests/accept/run/tlists.nim b/tests/accept/run/tlists.nim
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/accept/run/tlists.nim
diff --git a/tests/accept/run/ttables.nim b/tests/accept/run/ttables.nim
new file mode 100644
index 000000000..c7033bf70
--- /dev/null
+++ b/tests/accept/run/ttables.nim
@@ -0,0 +1,18 @@
+discard """
+  output: '''true'''
+"""
+
+import hashes, tables
+
+var t = initTable[tuple[x, y: int], string]()
+t[(0,0)] = "00"
+t[(1,0)] = "10"
+t[(0,1)] = "01"
+t[(1,1)] = "11"
+
+for x in 0..1:
+  for y in 0..1:
+    assert t[(x,y)] == $x & $y
+
+echo "true"
+