mirror of git://gcc.gnu.org/git/gcc.git
compiler: Don't permit importing a package as "init".
From-SVN: r205938
This commit is contained in:
parent
10d91e5798
commit
4201f42320
|
|
@ -440,6 +440,9 @@ Gogo::import_package(const std::string& filename,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (local_name == "init")
|
||||||
|
error_at(location, "cannot import package as init");
|
||||||
|
|
||||||
if (filename == "unsafe")
|
if (filename == "unsafe")
|
||||||
{
|
{
|
||||||
this->import_unsafe(local_name, is_local_name_exported, location);
|
this->import_unsafe(local_name, is_local_name_exported, location);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue