fixes #1029
This commit is contained in:
parent
0f26040074
commit
2c5743db3e
3 changed files with 11 additions and 6 deletions
|
|
@ -173,7 +173,7 @@ proc evalImport(c: PContext, n: PNode): PNode =
|
||||||
# ``addDecl`` needs to be done before ``importAllSymbols``!
|
# ``addDecl`` needs to be done before ``importAllSymbols``!
|
||||||
addDecl(c, m) # add symbol to symbol table of module
|
addDecl(c, m) # add symbol to symbol table of module
|
||||||
importAllSymbolsExcept(c, m, emptySet)
|
importAllSymbolsExcept(c, m, emptySet)
|
||||||
importForwarded(c, m.ast, emptySet)
|
#importForwarded(c, m.ast, emptySet)
|
||||||
|
|
||||||
proc evalFrom(c: PContext, n: PNode): PNode =
|
proc evalFrom(c: PContext, n: PNode): PNode =
|
||||||
result = n
|
result = n
|
||||||
|
|
@ -198,4 +198,4 @@ proc evalImportExcept*(c: PContext, n: PNode): PNode =
|
||||||
let ident = lookups.considerQuotedIdent(n.sons[i])
|
let ident = lookups.considerQuotedIdent(n.sons[i])
|
||||||
exceptSet.incl(ident.id)
|
exceptSet.incl(ident.id)
|
||||||
importAllSymbolsExcept(c, m, exceptSet)
|
importAllSymbolsExcept(c, m, exceptSet)
|
||||||
importForwarded(c, m.ast, exceptSet)
|
#importForwarded(c, m.ast, exceptSet)
|
||||||
|
|
|
||||||
|
|
@ -1935,11 +1935,13 @@ proc semExport(c: PContext, n: PNode): PNode =
|
||||||
while s != nil:
|
while s != nil:
|
||||||
if s.kind in ExportableSymKinds+{skModule}:
|
if s.kind in ExportableSymKinds+{skModule}:
|
||||||
x.add(newSymNode(s, a.info))
|
x.add(newSymNode(s, a.info))
|
||||||
|
strTableAdd(c.module.tab, s)
|
||||||
s = nextOverloadIter(o, c, a)
|
s = nextOverloadIter(o, c, a)
|
||||||
if c.module.ast.isNil:
|
when false:
|
||||||
c.module.ast = newNodeI(nkStmtList, n.info)
|
if c.module.ast.isNil:
|
||||||
assert c.module.ast.kind == nkStmtList
|
c.module.ast = newNodeI(nkStmtList, n.info)
|
||||||
c.module.ast.add x
|
assert c.module.ast.kind == nkStmtList
|
||||||
|
c.module.ast.add x
|
||||||
result = n
|
result = n
|
||||||
|
|
||||||
proc setGenericParams(c: PContext, n: PNode) =
|
proc setGenericParams(c: PContext, n: PNode) =
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,9 @@ discard """
|
||||||
|
|
||||||
import mexporta
|
import mexporta
|
||||||
|
|
||||||
|
# bug #1029:
|
||||||
|
from rawsockets import accept
|
||||||
|
|
||||||
# B.TMyObject has been imported implicitly here:
|
# B.TMyObject has been imported implicitly here:
|
||||||
var x: TMyObject
|
var x: TMyObject
|
||||||
echo($x, q(0), q"0")
|
echo($x, q(0), q"0")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue