renamed optional to discardable

This commit is contained in:
Araq 2011-09-24 19:18:08 +02:00
commit 485c371942
15 changed files with 72 additions and 63 deletions

View file

@ -550,7 +550,7 @@ proc buildEchoStmt(c: PContext, n: PNode): PNode =
proc semExprNoType(c: PContext, n: PNode): PNode =
proc ImplicitelyDiscardable(n: PNode): bool {.inline.} =
result = isCallExpr(n) and n.sons[0].kind == nkSym and
sfOptional in n.sons[0].sym.flags
sfDiscardable in n.sons[0].sym.flags
result = semExpr(c, n)
if result.typ != nil and result.typ.kind != tyStmt:
if gCmd == cmdInteractive: