File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed
Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -366,8 +366,15 @@ final class FirstPass : ASTVisitor
366366 foreach (bind; importDeclaration.importBindings.importBinds)
367367 {
368368 Tuple ! (string , string ) bindTuple;
369- bindTuple[0 ] = internString(bind.left.text);
370- bindTuple[1 ] = bind.right == tok! " " ? null : internString(bind.right.text);
369+ if (bind.right == tok! " " )
370+ {
371+ bindTuple[1 ] = internString(bind.left.text);
372+ }
373+ else
374+ {
375+ bindTuple[0 ] = internString(bind.left.text);
376+ bindTuple[1 ] = internString(bind.right.text);
377+ }
371378 info.importedSymbols.insert(bindTuple);
372379 }
373380 info.isPublic = protection == tok! " public" ;
Original file line number Diff line number Diff line change @@ -171,7 +171,7 @@ private:
171171
172172 foreach (tup; importInfo.importedSymbols[])
173173 {
174- ACSymbol needle = ACSymbol(tup[0 ]);
174+ ACSymbol needle = ACSymbol(tup[1 ]);
175175 ACSymbol* sym;
176176 auto r = symbol.parts.equalRange(&needle);
177177 if (r.empty) foreach (sy; symbol.parts[])
@@ -187,9 +187,9 @@ private:
187187 sym = r.front;
188188 if (sym is null )
189189 continue ;
190- if (tup[1 ] ! is null )
190+ if (tup[0 ] ! is null )
191191 {
192- ACSymbol* s = allocate! ACSymbol(symbolAllocator, tup[1 ],
192+ ACSymbol* s = allocate! ACSymbol(symbolAllocator, tup[0 ],
193193 sym.kind, sym.type);
194194 s.parts.insert(sym.parts[]);
195195 s.callTip = sym.callTip;
You can’t perform that action at this time.
0 commit comments