fixes #3730
This commit is contained in:
parent
55c1f3d30c
commit
38da21fc62
3 changed files with 11 additions and 3 deletions
|
|
@ -383,9 +383,11 @@ proc generateThunk(prc: PNode, dest: PType): PNode =
|
|||
# (see internal documentation):
|
||||
if gCmd == cmdCompileToJS: return prc
|
||||
result = newNodeIT(nkClosure, prc.info, dest)
|
||||
var conv = newNodeIT(nkHiddenStdConv, prc.info, dest)
|
||||
var conv = newNodeIT(nkHiddenSubConv, prc.info, dest)
|
||||
conv.add(emptyNode)
|
||||
conv.add(prc)
|
||||
if prc.kind == nkClosure:
|
||||
internalError(prc.info, "closure to closure created")
|
||||
result.add(conv)
|
||||
result.add(newNodeIT(nkNilLit, prc.info, getSysType(tyNil)))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue