mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-04 20:17:42 +00:00
fixes #1029
This commit is contained in:
@@ -173,7 +173,7 @@ proc evalImport(c: PContext, n: PNode): PNode =
|
||||
# ``addDecl`` needs to be done before ``importAllSymbols``!
|
||||
addDecl(c, m) # add symbol to symbol table of module
|
||||
importAllSymbolsExcept(c, m, emptySet)
|
||||
importForwarded(c, m.ast, emptySet)
|
||||
#importForwarded(c, m.ast, emptySet)
|
||||
|
||||
proc evalFrom(c: PContext, n: PNode): PNode =
|
||||
result = n
|
||||
@@ -198,4 +198,4 @@ proc evalImportExcept*(c: PContext, n: PNode): PNode =
|
||||
let ident = lookups.considerQuotedIdent(n.sons[i])
|
||||
exceptSet.incl(ident.id)
|
||||
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:
|
||||
if s.kind in ExportableSymKinds+{skModule}:
|
||||
x.add(newSymNode(s, a.info))
|
||||
strTableAdd(c.module.tab, s)
|
||||
s = nextOverloadIter(o, c, a)
|
||||
if c.module.ast.isNil:
|
||||
c.module.ast = newNodeI(nkStmtList, n.info)
|
||||
assert c.module.ast.kind == nkStmtList
|
||||
c.module.ast.add x
|
||||
when false:
|
||||
if c.module.ast.isNil:
|
||||
c.module.ast = newNodeI(nkStmtList, n.info)
|
||||
assert c.module.ast.kind == nkStmtList
|
||||
c.module.ast.add x
|
||||
result = n
|
||||
|
||||
proc setGenericParams(c: PContext, n: PNode) =
|
||||
|
||||
@@ -4,6 +4,9 @@ discard """
|
||||
|
||||
import mexporta
|
||||
|
||||
# bug #1029:
|
||||
from rawsockets import accept
|
||||
|
||||
# B.TMyObject has been imported implicitly here:
|
||||
var x: TMyObject
|
||||
echo($x, q(0), q"0")
|
||||
|
||||
Reference in New Issue
Block a user