Eliminate `Items::use_aliases`
jjcnn opened this issue · comments
jjcnn commented
Aliased imports, e.g.
use a::b as c;
are currently represented using two maps:
Items::use_synonyms
, which mapsb
to the declaration ofb
in modulea
.Items::use_aliases
, which mapsa
to the nameb
.
There really is no reason two have both maps, since the name b
is not in scope when using an aliased import.
jjcnn commented
Related to this, aliased imports are not reexported correctly:
import x::y; // this gets reexported as y
import z::w as v; // this does not get reexported, neither as w nor as v
Eliminating use_aliases
and only binding the aliased name should fix this issue.