summaryrefslogtreecommitdiff
path: root/src/resolve/index.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resolve/index.cpp')
-rw-r--r--src/resolve/index.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/resolve/index.cpp b/src/resolve/index.cpp
index b98c3b8e..0155455d 100644
--- a/src/resolve/index.cpp
+++ b/src/resolve/index.cpp
@@ -42,7 +42,8 @@ void _add_item(AST::Module& mod, IndexName location, const ::std::string& name,
DEBUG("Add " << location << " item '" << name << "': " << ir);
auto& list = get_mod_index(mod, location);
- if( false == list.insert(::std::make_pair(name, ::AST::Module::IndexEnt { is_pub, mv$(ir) } )).second )
+ bool was_import = (ir != mod.path() + name);
+ if( false == list.insert(::std::make_pair(name, ::AST::Module::IndexEnt { is_pub, was_import, mv$(ir) } )).second )
{
if( error_on_collision )
{