diff options
author | Araq <rumpf_a@web.de> | 2016-01-18 13:48:58 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2016-01-18 13:48:58 +0100 |
commit | 38da21fc62381fefe8f9e957fb0144cda4e7903a (patch) | |
tree | 52f15076071e8eca4d146ecfec260d1d1b1423aa /compiler/ccgexprs.nim | |
parent | 55c1f3d30ce5d2ab8745ab2b98a38a605c690a54 (diff) | |
download | Nim-38da21fc62381fefe8f9e957fb0144cda4e7903a.tar.gz |
fixes #3730
Diffstat (limited to 'compiler/ccgexprs.nim')
-rw-r--r-- | compiler/ccgexprs.nim | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/ccgexprs.nim b/compiler/ccgexprs.nim index 6f513c165..3607f347e 100644 --- a/compiler/ccgexprs.nim +++ b/compiler/ccgexprs.nim @@ -1847,6 +1847,8 @@ proc genClosure(p: BProc, n: PNode, d: var TLoc) = var tmp, a, b: TLoc initLocExpr(p, n.sons[0], a) initLocExpr(p, n.sons[1], b) + if n.sons[0].skipConv.kind == nkClosure: + internalError(n.info, "closure to closure created") getTemp(p, n.typ, tmp) linefmt(p, cpsStmts, "$1.ClPrc = $2; $1.ClEnv = $3;$n", tmp.rdLoc, a.rdLoc, b.rdLoc) |