Closure iterators are not supported by VM (#15818)
This commit is contained in:
parent
544cb107c7
commit
5b4c17b5e7
2 changed files with 11 additions and 0 deletions
|
|
@ -1982,6 +1982,8 @@ proc gen(c: PCtx; n: PNode; dest: var TDest; flags: TGenFlags = {}) =
|
|||
genRdVar(c, n, dest, flags)
|
||||
of skProc, skFunc, skConverter, skMacro, skTemplate, skMethod, skIterator:
|
||||
# 'skTemplate' is only allowed for 'getAst' support:
|
||||
if s.kind == skIterator and s.typ.callConv == TCallingConvention.ccClosure:
|
||||
globalError(c.config, n.info, "Closure iterators are not supported by VM!")
|
||||
if procIsCallback(c, s): discard
|
||||
elif importcCond(s): c.importcSym(n.info, s)
|
||||
genLit(c, n, dest)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue