From 0b0baece89883a2d91d9ebbff66538d974ee1fbc Mon Sep 17 00:00:00 2001 From: Araq Date: Wed, 27 Dec 2017 21:26:37 +0100 Subject: fixes #6980 --- tests/exprs/tstmtexprs.nim | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'tests/exprs/tstmtexprs.nim') 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") -- cgit 1.4.1-2-gfad0