mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-03 03:32:32 +00:00
committed by
Andreas Rumpf
parent
e3e5ae287f
commit
d502ddea9e
@@ -1963,7 +1963,8 @@ 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 '{.noReturn.}' proc")
|
||||
else: localError(c.config, n.sons[j].info,
|
||||
"unreachable statement after 'return' statement or '{.noReturn.}' proc")
|
||||
else: discard
|
||||
|
||||
if result.len == 1 and
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
discard """
|
||||
file: "tstatret.nim"
|
||||
line: 9
|
||||
errormsg: "unreachable statement after '{.noReturn.}' proc"
|
||||
errormsg: "unreachable statement after 'return' statement or '{.noReturn.}' proc"
|
||||
"""
|
||||
# no statement after return
|
||||
proc main() =
|
||||
|
||||
Reference in New Issue
Block a user