diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2019-07-06 20:38:10 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-07-06 20:38:10 +0200 |
commit | cab0c3e544bb65bdd9b0f2d0e60dce55ac0776ad (patch) | |
tree | 9d04995892f6fdd31bd6bf7e05ec4f18762657e0 | |
parent | 64e14089203ae5532360966f348e96ce8d7ea676 (diff) | |
download | Nim-cab0c3e544bb65bdd9b0f2d0e60dce55ac0776ad.tar.gz |
fixes #3333
-rw-r--r-- | compiler/importer.nim | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/importer.nim b/compiler/importer.nim index a43818d93..a11c6c6ab 100644 --- a/compiler/importer.nim +++ b/compiler/importer.nim @@ -79,19 +79,19 @@ proc importSymbol(c: PContext, n: PNode, fromMod: PSym) = else: when false: if s.kind == skStub: loadStub(s) - if s.kind notin ExportableSymKinds: - internalError(c.config, n.info, "importSymbol: 2") + let multiImport = s.kind notin ExportableSymKinds or s.kind in skProcKinds # for an enumeration we have to add all identifiers - case s.kind - of skProcKinds: + if multiImport: # for a overloadable syms add all overloaded routines var it: TIdentIter var e = initIdentIter(it, fromMod.tab, s.name) while e != nil: if e.name.id != s.name.id: internalError(c.config, n.info, "importSymbol: 3") - rawImportSymbol(c, e) + if s.kind in ExportableSymKinds: + rawImportSymbol(c, e) e = nextIdentIter(it, fromMod.tab) - else: rawImportSymbol(c, s) + else: + rawImportSymbol(c, s) suggestSym(c.config, n.info, s, c.graph.usageSym, false) proc importAllSymbolsExcept(c: PContext, fromMod: PSym, exceptSet: IntSet) = |