This commit is contained in:
Andreas Rumpf
2019-03-25 19:26:38 +01:00
committed by GitHub
parent 663b1f2c96
commit 8e1c6e2e2d
2 changed files with 8 additions and 1 deletions

View File

@@ -2086,7 +2086,9 @@ proc parseConstant(p: var TParser): PNode =
addSon(result, p.emptyNode)
eat(p, tkEquals)
optInd(p, result)
addSon(result, parseStmtListExpr(p))
#addSon(result, parseStmtListExpr(p))
addSon(result, parseExpr(p))
result[^1] = postExprBlocks(p, result[^1])
indAndComment(p, result)
proc parseBind(p: var TParser, k: TNodeKind): PNode =

View File

@@ -49,3 +49,8 @@ let
aaa = t 2 + 4
ccc = t (1, 1) + 6
ddd = t [0, 1, 2] + 5
# bug #10896
const
test =
proc(): int = 1