diff options
Diffstat (limited to 'compiler/pragmas.nim')
-rw-r--r-- | compiler/pragmas.nim | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/pragmas.nim b/compiler/pragmas.nim index 4d5240e3c..c0c9cc06a 100644 --- a/compiler/pragmas.nim +++ b/compiler/pragmas.nim @@ -121,7 +121,7 @@ proc pragmaEnsures(c: PContext, n: PNode) = openScope(c) let o = getCurrOwner(c) if o.kind in routineKinds and o.typ != nil and o.typ.sons[0] != nil: - var s = newSym(skResult, getIdent(c.cache, "result"), o, n.info) + var s = newSym(skResult, getIdent(c.cache, "result"), nextId(c.idgen), o, n.info) s.typ = o.typ.sons[0] incl(s.flags, sfUsed) addDecl(c, s) @@ -636,7 +636,7 @@ proc processPragma(c: PContext, n: PNode, i: int) = elif it.safeLen != 2 or it[0].kind != nkIdent or it[1].kind != nkIdent: invalidPragma(c, n) - var userPragma = newSym(skTemplate, it[1].ident, nil, it.info, c.config.options) + var userPragma = newSym(skTemplate, it[1].ident, nextId(c.idgen), nil, it.info, c.config.options) userPragma.ast = newTreeI(nkPragma, n.info, n.sons[i+1..^1]) strTableAdd(c.userPragmas, userPragma) @@ -717,7 +717,7 @@ proc deprecatedStmt(c: PContext; outerPragma: PNode) = if dest == nil or dest.kind in routineKinds: localError(c.config, n.info, warnUser, "the .deprecated pragma is unreliable for routines") let src = considerQuotedIdent(c, n[0]) - let alias = newSym(skAlias, src, dest, n[0].info, c.config.options) + let alias = newSym(skAlias, src, nextId(c.idgen), dest, n[0].info, c.config.options) incl(alias.flags, sfExported) if sfCompilerProc in dest.flags: markCompilerProc(c, alias) addInterfaceDecl(c, alias) @@ -739,7 +739,7 @@ proc pragmaGuard(c: PContext; it: PNode; kind: TSymKind): PSym = # We return a dummy symbol; later passes over the type will repair it. # Generic instantiation needs to know about this too. But we're lazy # and perform the lookup on demand instead. - result = newSym(skUnknown, considerQuotedIdent(c, n), nil, n.info, + result = newSym(skUnknown, considerQuotedIdent(c, n), nextId(c.idgen), nil, n.info, c.config.options) else: result = qualifiedLookUp(c, n, {checkUndeclared}) |