summary refs log tree commit diff stats
path: root/lib/pure/strtabs.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2011-04-29 22:55:15 +0200
committerAraq <rumpf_a@web.de>2011-04-29 22:55:15 +0200
commit145fabeb67fefafab0c019b57fde74a58f9454e7 (patch)
treeb942c3125b1df4bb9fdce6a466709eb439fa0cc1 /lib/pure/strtabs.nim
parented887e67e93954e1b1ace068abc1c0d5f2e67b72 (diff)
downloadNim-145fabeb67fefafab0c019b57fde74a58f9454e7.tar.gz
const table support
Diffstat (limited to 'lib/pure/strtabs.nim')
-rwxr-xr-xlib/pure/strtabs.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pure/strtabs.nim b/lib/pure/strtabs.nim
index 8be66dee9..f88560304 100755
--- a/lib/pure/strtabs.nim
+++ b/lib/pure/strtabs.nim
@@ -1,7 +1,7 @@
 #
 #
 #            Nimrod's Runtime Library
-#        (c) Copyright 2010 Andreas Rumpf
+#        (c) Copyright 2011 Andreas Rumpf
 #
 #    See the file "copying.txt", included in this
 #    distribution, for details about the copyright.
@@ -210,7 +210,7 @@ proc `$`*(t: PStringTable): string {.rtl, extern: "nstDollar".} =
     result.add("}")
 
 when isMainModule:
-  var x = {"k": "v", "11": "22", "565": "67"}.newStringTable
+  const x = {"k": "v", "11": "22", "565": "67"}.newStringTable
   assert x["k"] == "v"
   assert x["11"] == "22"
   assert x["565"] == "67"