summary refs log tree commit diff stats
path: root/tests/misc/tstrange.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2014-04-09 22:56:18 +0200
committerAndreas Rumpf <rumpf_a@web.de>2014-04-09 22:56:18 +0200
commita690e7b26772a9bb8367acb451a6250449e666ab (patch)
tree9aca0024db9c75970c4dfac10c55f1961c21ca25 /tests/misc/tstrange.nim
parentd0f013477b16520eefff69b861d2f26744463880 (diff)
parenta157985e01cbf80383d5e50836072d70678c9de3 (diff)
downloadNim-a690e7b26772a9bb8367acb451a6250449e666ab.tar.gz
Merge pull request #1075 from flaviut/inlinedocs
Add some documentations and code examples in system
Diffstat (limited to 'tests/misc/tstrange.nim')
-rw-r--r--tests/misc/tstrange.nim23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/misc/tstrange.nim b/tests/misc/tstrange.nim
new file mode 100644
index 000000000..3947755fc
--- /dev/null
+++ b/tests/misc/tstrange.nim
@@ -0,0 +1,23 @@
+discard """
+  file: "tstrange.nim"
+  output: "hallo4"
+"""
+# test for extremely strange bug

+

+proc ack(x: int, y: int): int =

+  if x != 0:

+    if y != 5:

+      return y

+    return x

+  return x+y

+

+proc gen[T](a: T) =

+  write(stdout, a)

+

+

+gen("hallo")

+write(stdout, ack(5, 4))

+#OUT hallo4

+

+
+