diff options
Diffstat (limited to 'compiler/lambdalifting.nim')
-rw-r--r-- | compiler/lambdalifting.nim | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/lambdalifting.nim b/compiler/lambdalifting.nim index 6f0f8e0a5..e2d1a143f 100644 --- a/compiler/lambdalifting.nim +++ b/compiler/lambdalifting.nim @@ -480,9 +480,7 @@ proc detectCapturedVars(n: PNode; owner: PSym; c: var DetectionPass) = if n.typ != nil: detectCapturedVars(n[namePos], owner, c) of nkReturnStmt: - if n[0].kind in {nkAsgn, nkFastAsgn}: - detectCapturedVars(n[0].sons[1], owner, c) - else: assert n[0].kind == nkEmpty + detectCapturedVars(n[0], owner, c) else: for i in 0..<n.len: detectCapturedVars(n[i], owner, c) |