fixes #3711
This commit is contained in:
parent
fc967cc715
commit
04af9d4051
1 changed files with 1 additions and 1 deletions
|
|
@ -17,7 +17,7 @@ proc semDiscard(c: PContext, n: PNode): PNode =
|
||||||
checkSonsLen(n, 1)
|
checkSonsLen(n, 1)
|
||||||
if n.sons[0].kind != nkEmpty:
|
if n.sons[0].kind != nkEmpty:
|
||||||
n.sons[0] = semExprWithType(c, n.sons[0])
|
n.sons[0] = semExprWithType(c, n.sons[0])
|
||||||
if isEmptyType(n.sons[0].typ) or n.sons[0].typ.kind == tyNone:
|
if isEmptyType(n.sons[0].typ) or n.sons[0].typ.kind == tyNone or n.sons[0].kind == nkTypeOfExpr:
|
||||||
localError(n.info, errInvalidDiscard)
|
localError(n.info, errInvalidDiscard)
|
||||||
|
|
||||||
proc semBreakOrContinue(c: PContext, n: PNode): PNode =
|
proc semBreakOrContinue(c: PContext, n: PNode): PNode =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue