fixes crash related to runnableExamples in Nim doc that yet uses the VM

This commit is contained in:
Andreas Rumpf 2017-12-09 13:40:08 +01:00
commit 14f2578604

View file

@ -1130,6 +1130,8 @@ proc genMagic(c: PCtx; n: PNode; dest: var TDest; m: TMagic) =
# produces a value
else:
globalError(n.info, "expandToAst requires a call expression")
of mRunnableExamples:
discard "just ignore any call to runnableExamples"
else:
# mGCref, mGCunref,
globalError(n.info, "cannot generate code for: " & $m)