compiler: Don't permit importing a package as "init".

From-SVN: r205938
This commit is contained in:
Ian Lance Taylor 2013-12-12 19:25:29 +00:00
parent 10d91e5798
commit 4201f42320
1 changed files with 3 additions and 0 deletions

View File

@ -440,6 +440,9 @@ Gogo::import_package(const std::string& filename,
return;
}
if (local_name == "init")
error_at(location, "cannot import package as init");
if (filename == "unsafe")
{
this->import_unsafe(local_name, is_local_name_exported, location);