diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2019-07-06 15:23:57 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-07-06 15:24:14 +0200 |
commit | 2678fa679ad6bbdec11945e4ca9ba78eab490188 (patch) | |
tree | 7b7a7489e52486bf57dcbcfe4155f434f58a755f /compiler | |
parent | 02b9af2f7537a5ced5ad3b1bfac14eb036b9a678 (diff) | |
download | Nim-2678fa679ad6bbdec11945e4ca9ba78eab490188.tar.gz |
fixes #7057
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/lowerings.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/lowerings.nim b/compiler/lowerings.nim index 55917a2f5..3672a2e29 100644 --- a/compiler/lowerings.nim +++ b/compiler/lowerings.nim @@ -707,7 +707,7 @@ proc wrapProcForSpawn*(g: ModuleGraph; owner: PSym; spawnExpr: PNode; retType: P var fn = n.sons[0] # templates and macros are in fact valid here due to the nature of # the transformation: - if fn.kind == nkClosure: + if fn.kind == nkClosure or (fn.typ != nil and fn.typ.callConv == ccClosure): localError(g.config, n.info, "closure in spawn environment is not allowed") if not (fn.kind == nkSym and fn.sym.kind in {skProc, skTemplate, skMacro, skFunc, skMethod, skConverter}): |