further steps for closure support

This commit is contained in:
Araq 2012-02-06 08:44:18 +01:00
commit 161f6f7229
8 changed files with 41 additions and 21 deletions

View file

@ -433,7 +433,8 @@ proc transformConv(c: PTransf, n: PNode): PTransNode =
result = transform(c, n.sons[1])
of tyProc:
if dest.callConv == ccClosure and source.callConv == ccDefault:
result = generateThunk(c, n.sons[1], dest).ptransnode
let x = transform(c, n.sons[1]).pnode
result = generateThunk(c, x, dest).ptransnode
else:
result = transformSons(c, n)
of tyGenericParam, tyOrdinal: