summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2016-12-18 20:21:50 +0100
committerAraq <rumpf_a@web.de>2016-12-18 20:21:50 +0100
commit91935fd915ce643472c81e11a04d1531eacad6e9 (patch)
treedb63c1e68d33c7c183783eb43937b1d1748b02a3 /tests
parent6d10b365feaf6c5634a9698caa4e885f8a47daae (diff)
downloadNim-91935fd915ce643472c81e11a04d1531eacad6e9.tar.gz
fixes #4308, fixes #4905
Diffstat (limited to 'tests')
-rw-r--r--tests/errmsgs/tdont_show_system.nim13
-rw-r--r--tests/errmsgs/tproper_stacktrace.nim11
2 files changed, 24 insertions, 0 deletions
diff --git a/tests/errmsgs/tdont_show_system.nim b/tests/errmsgs/tdont_show_system.nim
new file mode 100644
index 000000000..6963a8a3f
--- /dev/null
+++ b/tests/errmsgs/tdont_show_system.nim
@@ -0,0 +1,13 @@
+discard """
+  errormsg: "value of type 'bool' has to be discarded"
+  line: 13
+  file: "tdont_show_system.nim"
+"""
+
+# bug #4308
+
+#proc getGameTile: int =
+#  1 > 0
+
+# bug #4905  subsumes the problem of #4308:
+true notin {false}
diff --git a/tests/errmsgs/tproper_stacktrace.nim b/tests/errmsgs/tproper_stacktrace.nim
new file mode 100644
index 000000000..57e65fa6f
--- /dev/null
+++ b/tests/errmsgs/tproper_stacktrace.nim
@@ -0,0 +1,11 @@
+discard """
+  outputsub: '''tproper_stacktrace.nim(7) tproper_stacktrace'''
+  exitcode: 1
+"""
+
+template fuzzy(x) =
+  echo x[] != 9
+
+var p: ptr int
+fuzzy p
+