fixes #11133, error on runtime use of compile-time procs in JS target (#11134)

This commit is contained in:
jrfondren
2019-04-29 08:31:44 -05:00
committed by Andreas Rumpf
parent 6e3a4ebf6a
commit 0e1bc3f5ca

View File

@@ -1361,6 +1361,9 @@ proc genSym(p: PProc, n: PNode, r: var TCompRes) =
internalError(p.config, n.info, "symbol has no generated name: " & s.name.s)
r.res = s.loc.r
of skProc, skFunc, skConverter, skMethod:
if sfCompileTime in s.flags:
localError(p.config, n.info, "request to generate code for .compileTime proc: " &
s.name.s)
discard mangleName(p.module, s)
r.res = s.loc.r
if lfNoDecl in s.loc.flags or s.magic != mNone or