this ensures libp2p continues to compile [backport] (#18908)
This commit is contained in:
parent
5325a366e7
commit
cdf9ac675b
2 changed files with 16 additions and 5 deletions
|
|
@ -855,10 +855,15 @@ proc closureSetup(p: BProc, prc: PSym) =
|
|||
[rdLoc(env.loc), getTypeDesc(p.module, env.typ)])
|
||||
|
||||
proc containsResult(n: PNode): bool =
|
||||
if n.kind == nkSym and n.sym.kind == skResult:
|
||||
result = true
|
||||
result = false
|
||||
case n.kind
|
||||
of nkEmpty..pred(nkSym), succ(nkSym)..nkNilLit, nkFormalParams:
|
||||
discard
|
||||
of nkSym:
|
||||
if n.sym.kind == skResult:
|
||||
result = true
|
||||
else:
|
||||
for i in 0..<n.safeLen:
|
||||
for i in 0..<n.len:
|
||||
if containsResult(n[i]): return true
|
||||
|
||||
const harmless = {nkConstSection, nkTypeSection, nkEmpty, nkCommentStmt, nkTemplateDef,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue