Revert "fix tforwardgeneric"

This reverts commit d82a032566.
This commit is contained in:
Araq 2013-05-27 23:18:15 +02:00
commit e3f93241c3
4 changed files with 6 additions and 8 deletions

View file

@ -288,9 +288,6 @@ proc interestingVar(s: PSym): bool {.inline.} =
proc semCaptureSym*(s, owner: PSym) =
if interestingVar(s) and owner.id != s.owner.id and s.kind != skResult:
if owner.typ != nil and not isGenericRoutine(owner):
# XXX: is this really safe?
# if we capture a var from another generic routine,
# it won't be consider captured.
owner.typ.callConv = ccClosure
#echo "semCaptureSym ", owner.name.s, owner.id, " ", s.name.s, s.id
# since the analysis is not entirely correct, we don't set 'tfCapturesEnv'