Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Araq authored and PMunch committed Mar 28, 2022
1 parent c562237 commit 22006de
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion compiler/semexprs.nim
Original file line number Diff line number Diff line change
Expand Up @@ -2962,7 +2962,8 @@ proc semExpr(c: PContext, n: PNode, flags: TExprFlags = {}): PNode =
of nkMixinStmt: discard
of nkBindStmt:
if c.p != nil:
c.p.localBindStmts.add n
if n.len > 0 and n[0].kind == nkSym:
c.p.localBindStmts.add n
else:
localError(c.config, n.info, "invalid context for 'bind' statement: " &
renderTree(n, {renderNoComments}))
Expand Down

0 comments on commit 22006de

Please sign in to comment.