This commit is contained in:
Araq 2012-09-23 01:18:13 +02:00
commit 92e49aeaaf
3 changed files with 11 additions and 7 deletions

View file

@ -737,7 +737,7 @@ proc semProcAux(c: PContext, n: PNode, kind: TSymKind,
if n.sons[pragmasPos].kind != nkEmpty:
LocalError(n.sons[pragmasPos].info, errPragmaOnlyInHeaderOfProc)
if sfForward notin proto.flags:
LocalError(n.info, errAttemptToRedefine, proto.name.s)
WrongRedefinition(n.info, proto.name.s)
excl(proto.flags, sfForward)
closeScope(c.tab) # close scope with wrong parameter symbols
openScope(c.tab) # open scope for old (correct) parameter symbols