next steps for closure consistency; fixes #176
This commit is contained in:
parent
39f399f424
commit
20b6dc3829
9 changed files with 495 additions and 9 deletions
|
|
@ -108,7 +108,7 @@ proc semSym(c: PContext, n: PNode, s: PSym, flags: TExprFlags): PNode =
|
|||
incl(c.p.owner.flags, sfSideEffect)
|
||||
elif s.kind == skParam and s.typ.kind == tyExpr:
|
||||
return s.typ.n
|
||||
elif s.owner != c.p.owner and s.owner.kind != skModule and
|
||||
elif s.owner != c.p.owner and
|
||||
c.p.owner.typ != nil and not IsGenericRoutine(s.owner):
|
||||
c.p.owner.typ.callConv = ccClosure
|
||||
if illegalCapture(s) or c.p.next.owner != s.owner:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue