mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 14:00:35 +00:00
committed by
Andreas Rumpf
parent
f86b827d9e
commit
05769020d3
@@ -1963,7 +1963,7 @@ proc semStmtList(c: PContext, n: PNode, flags: TExprFlags): PNode =
|
||||
case n.sons[j].kind
|
||||
of nkPragma, nkCommentStmt, nkNilLit, nkEmpty, nkBlockExpr,
|
||||
nkBlockStmt, nkState: discard
|
||||
else: localError(c.config, n.sons[j].info, "unreachable statement after 'return'")
|
||||
else: localError(c.config, n.sons[j].info, "unreachable statement after '{.noReturn.}' proc")
|
||||
else: discard
|
||||
|
||||
if result.len == 1 and
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
discard """
|
||||
file: "tstatret.nim"
|
||||
line: 9
|
||||
errormsg: "unreachable statement after 'return'"
|
||||
errormsg: "unreachable statement after '{.noReturn.}' proc"
|
||||
"""
|
||||
# no statement after return
|
||||
proc main() =
|
||||
|
||||
Reference in New Issue
Block a user