This commit is contained in:
Andrey R (cooldome)
2020-11-17 12:34:33 +00:00
committed by metagn
parent 8b88b5fdd8
commit 1e11ff6b84
2 changed files with 3 additions and 2 deletions

View File

@@ -2622,7 +2622,8 @@ proc semProcAux(c: PContext, n: PNode, kind: TSymKind,
proc determineType(c: PContext, s: PSym) =
if s.typ != nil: return
#if s.magic != mNone: return
#if s.ast.isNil: return
if s.ast.isNil:
globalError(c.config, s.info, errIllFormedAstX, "symbol of kind " & $s.kind)
discard semProcAux(c, s.ast, s.kind, {})
proc semIterator(c: PContext, n: PNode): PNode =

View File

@@ -2184,7 +2184,7 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg =
else: regs[rc].node.strVal
if k < 0 or k > ord(high(TSymKind)):
internalError(c.config, c.debug[pc], "request to create symbol of invalid kind")
var sym = newSym(k.TSymKind, getIdent(c.cache, name), c.idgen, c.module.owner, c.debug[pc])
var sym = newSym(k.TSymKind, getIdent(c.cache, name), c.idgen, c.module, c.debug[pc])
incl(sym.flags, sfGenSym)
regs[ra].node = newSymNode(sym)
regs[ra].node.flags.incl nfIsRef