fixes regressions

This commit is contained in:
Andreas Rumpf 2016-01-05 15:39:49 +01:00
commit 4d10937a30
3 changed files with 55 additions and 0 deletions

View file

@ -186,6 +186,8 @@ proc newSymG*(kind: TSymKind, n: PNode, c: PContext): PSym =
result.owner = getCurrOwner()
else:
result = newSym(kind, considerQuotedIdent(n), getCurrOwner(), n.info)
#if kind in {skForVar} and result.owner.kind == skModule:
# incl(result.flags, sfGlobal)
proc semIdentVis(c: PContext, kind: TSymKind, n: PNode,
allowed: TSymFlags): PSym

View file

@ -326,6 +326,8 @@ proc semIdentDef(c: PContext, n: PNode, kind: TSymKind): PSym =
incl(result.flags, sfGlobal)
else:
result = semIdentWithPragma(c, kind, n, {})
if result.owner.kind == skModule:
incl(result.flags, sfGlobal)
suggestSym(n.info, result)
styleCheckDef(result)