bugfix: preliminary symbol declaration in first pass of generics
This commit is contained in:
parent
5e5ed192e5
commit
e9d6f5a647
3 changed files with 17 additions and 10 deletions
|
|
@ -68,7 +68,10 @@ proc AddSym*(t: var TStrTable, n: PSym) =
|
|||
proc addDecl*(c: PContext, sym: PSym) =
|
||||
if SymTabAddUnique(c.tab, sym) == Failure:
|
||||
LocalError(sym.info, errAttemptToRedefine, sym.Name.s)
|
||||
|
||||
|
||||
proc addPrelimDecl*(c: PContext, sym: PSym) =
|
||||
discard SymTabAddUnique(c.tab, sym)
|
||||
|
||||
proc addDeclAt*(c: PContext, sym: PSym, at: Natural) =
|
||||
if SymTabAddUniqueAt(c.tab, sym, at) == Failure:
|
||||
LocalError(sym.info, errAttemptToRedefine, sym.Name.s)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue