summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorLemonBoy <LemonBoy@users.noreply.github.com>2018-07-01 15:27:14 +0200
committerAndreas Rumpf <rumpf_a@web.de>2018-07-01 15:27:14 +0200
commitdbbe311e18e1c7a2ecf6d9788010400161507532 (patch)
treec110d1719679bb22732b54d76e856f07f09d83a0 /tests
parentb61e69202bfc5f0d122973b8e9cdaf88350f5f73 (diff)
downloadNim-dbbe311e18e1c7a2ecf6d9788010400161507532.tar.gz
Minor changes to discardable handling (#8155)
Diffstat (limited to 'tests')
-rw-r--r--tests/exprs/tstmtexprs.nim10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/exprs/tstmtexprs.nim b/tests/exprs/tstmtexprs.nim
index 577f314ec..e91c20458 100644
--- a/tests/exprs/tstmtexprs.nim
+++ b/tests/exprs/tstmtexprs.nim
@@ -151,3 +151,13 @@ if true:
   fooBool()
 else:
   raise newException(ValueError, "argh")
+
+# bug #5374
+
+proc test1(): int64 {.discardable.} = discard
+proc test2(): int {.discardable.} = discard
+
+if true:
+  test1()
+else:
+  test2()