Add checks for except: body blocks (#9191)

This commit is contained in:
Dheepak Krishnamurthy 2018-10-09 06:09:22 -06:00 • committed by Andreas Rumpf
commit 70018aa683
4 changed files with 42 additions and 2 deletions

View file

@ -1578,7 +1578,6 @@ proc parseTry(p: var TParser; isExpr: bool): PNode =
colcom(p, b)
addSon(b, parseStmt(p))
addSon(result, b)
if b.kind == nkFinally: break
if b == nil: parMessage(p, "expected 'except'")
proc parseExceptBlock(p: var TParser, kind: TNodeKind): PNode =