summary refs log tree commit diff stats
path: root/tests/exprs/tstmtexprs.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/exprs/tstmtexprs.nim')
-rw-r--r--tests/exprs/tstmtexprs.nim12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/exprs/tstmtexprs.nim b/tests/exprs/tstmtexprs.nim
index 9283f7268..2a0ec2821 100644
--- a/tests/exprs/tstmtexprs.nim
+++ b/tests/exprs/tstmtexprs.nim
@@ -140,4 +140,14 @@ echo(
   else:
      quo do (a: int) -> bool:
         a mod 3 != 0
-)
\ No newline at end of file
+)
+
+# bug #6980
+
+proc fooBool: bool {.discardable.} =
+  true
+
+if true:
+  fooBool()
+else:
+  raise newException(ValueError, "argh")