'nil' as a statement is deprecated, use an empty 'discard' instead

This commit is contained in:
Araq 2014-01-19 16:54:59 +01:00
commit 73c6efdf66
54 changed files with 170 additions and 170 deletions

View file

@ -54,7 +54,7 @@ proc isPartOfAux(a, b: PType, marker: var TIntSet): TAnalysisResult =
for i in countup(0, sonsLen(a) - 1):
result = isPartOfAux(a.sons[i], b, marker)
if result == arYes: return
else: nil
else: discard
proc isPartOf(a, b: PType): TAnalysisResult =
## checks iff 'a' can be part of 'b'. Iterates over VALUE types!
@ -140,7 +140,7 @@ proc isPartOf*(a, b: PNode): TAnalysisResult =
result = isPartOf(a[1], b[1])
of nkObjUpConv, nkObjDownConv, nkCheckedFieldExpr:
result = isPartOf(a[0], b[0])
else: nil
else: discard
# Calls return a new location, so a default of ``arNo`` is fine.
else:
# go down recursively; this is quite demanding:
@ -177,6 +177,6 @@ proc isPartOf*(a, b: PNode): TAnalysisResult =
if isPartOf(a.typ, b.typ) != arNo:
result = isPartOf(a[0], b)
if result == arNo: result = arMaybe
else: nil
else: nil
else: discard
else: discard