Fix second import of package using _.

From-SVN: r170755
This commit is contained in:
Ian Lance Taylor 2011-03-07 21:29:46 +00:00
parent 6481a43b01
commit b4ed59860a

View File

@ -308,12 +308,7 @@ Gogo::import_package(const std::string& filename,
ln = package->name();
is_ln_exported = Lex::is_exported_name(ln);
}
if (ln != ".")
{
ln = this->pack_hidden_name(ln, is_ln_exported);
this->package_->bindings()->add_package(ln, package);
}
else
if (ln == ".")
{
Bindings* bindings = package->bindings();
for (Bindings::const_declarations_iterator p =
@ -322,6 +317,13 @@ Gogo::import_package(const std::string& filename,
++p)
this->add_named_object(p->second);
}
else if (ln == "_")
package->set_uses_sink_alias();
else
{
ln = this->pack_hidden_name(ln, is_ln_exported);
this->package_->bindings()->add_package(ln, package);
}
return;
}