diff --git a/src/conversion/first.d b/src/conversion/first.d index 97743cd..f73766a 100644 --- a/src/conversion/first.d +++ b/src/conversion/first.d @@ -366,8 +366,15 @@ final class FirstPass : ASTVisitor foreach (bind; importDeclaration.importBindings.importBinds) { Tuple!(string, string) bindTuple; - bindTuple[0] = internString(bind.left.text); - bindTuple[1] = bind.right == tok!"" ? null : internString(bind.right.text); + if (bind.right == tok!"") + { + bindTuple[1] = internString(bind.left.text); + } + else + { + bindTuple[0] = internString(bind.left.text); + bindTuple[1] = internString(bind.right.text); + } info.importedSymbols.insert(bindTuple); } info.isPublic = protection == tok!"public"; diff --git a/src/conversion/second.d b/src/conversion/second.d index 72c4076..19e8553 100644 --- a/src/conversion/second.d +++ b/src/conversion/second.d @@ -171,7 +171,7 @@ private: foreach (tup; importInfo.importedSymbols[]) { - ACSymbol needle = ACSymbol(tup[0]); + ACSymbol needle = ACSymbol(tup[1]); ACSymbol* sym; auto r = symbol.parts.equalRange(&needle); if (r.empty) foreach (sy; symbol.parts[]) @@ -187,9 +187,9 @@ private: sym = r.front; if (sym is null) continue; - if (tup[1] !is null) + if (tup[0] !is null) { - ACSymbol* s = allocate!ACSymbol(symbolAllocator, tup[1], + ACSymbol* s = allocate!ACSymbol(symbolAllocator, tup[0], sym.kind, sym.type); s.parts.insert(sym.parts[]); s.callTip = sym.callTip;