summary refs log tree commit diff stats
path: root/tests/rodfiles
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2011-11-06 01:11:38 +0100
committerAraq <rumpf_a@web.de>2011-11-06 01:11:38 +0100
commit089e287c6e95edab56e610f7a615933e42aaff52 (patch)
tree8ccb6c1937af7651de369b5bbe7d828b8877f409 /tests/rodfiles
parentdc08a033d910aea19fde0f59c9d1a5e70d7efc15 (diff)
downloadNim-089e287c6e95edab56e610f7a615933e42aaff52.tar.gz
compilation cache: fixed recently introduced bug (lazy loading of bodies)
Diffstat (limited to 'tests/rodfiles')
-rw-r--r--tests/rodfiles/tgeneric1.nim13
-rw-r--r--tests/rodfiles/tgeneric2.nim13
2 files changed, 26 insertions, 0 deletions
diff --git a/tests/rodfiles/tgeneric1.nim b/tests/rodfiles/tgeneric1.nim
new file mode 100644
index 000000000..a3f7b870b
--- /dev/null
+++ b/tests/rodfiles/tgeneric1.nim
@@ -0,0 +1,13 @@
+discard """
+  output: "abcd"
+"""
+
+import tables
+
+var x = initTable[int, string]()
+
+x[2] = "ab"
+x[5] = "cd"
+
+echo x[2], x[5]
+
diff --git a/tests/rodfiles/tgeneric2.nim b/tests/rodfiles/tgeneric2.nim
new file mode 100644
index 000000000..552d60267
--- /dev/null
+++ b/tests/rodfiles/tgeneric2.nim
@@ -0,0 +1,13 @@
+discard """
+  output: "abef"
+"""
+
+import tables
+
+var x = initTable[int, string]()
+
+x[2] = "ab"
+x[5] = "ef"
+
+echo x[2], x[5]
+