summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2015-08-08 00:56:38 +0200
committerAndreas Rumpf <rumpf_a@web.de>2015-08-08 00:56:38 +0200
commit8668c42e942bc6a213e1c97d5c5a1ed7f3480ecc (patch)
tree1a464bfe72abb646aebc74da1677f6c76592d390
parent87815cbdf76a7aa7c414d0fb82b46778fa1d8b92 (diff)
parent7bc3d7da75c0d3b504c90842016e887407e6ed40 (diff)
downloadNim-8668c42e942bc6a213e1c97d5c5a1ed7f3480ecc.tar.gz
Merge pull request #3190 from yglukhov/fix-3186
Fixes #3186
-rw-r--r--compiler/semstmts.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim
index b9b175962..3d9363d77 100644
--- a/compiler/semstmts.nim
+++ b/compiler/semstmts.nim
@@ -1440,7 +1440,7 @@ proc semStmtList(c: PContext, n: PNode, flags: TExprFlags): PNode =
           of nkPragma, nkCommentStmt, nkNilLit, nkEmpty: discard
           else: localError(n.sons[j].info, errStmtInvalidAfterReturn)
       else: discard
-  if result.len == 1:
+  if result.len == 1 and result.sons[0].kind != nkDefer:
     result = result.sons[0]
   when defined(nimfix):
     if result.kind == nkCommentStmt and not result.comment.isNil and