From 86bbb1aff4b4375e45b5fb04e586f81ff98edb95 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Tue, 30 Aug 2016 22:00:26 +0800 Subject: Resolve - (minor) Debug --- src/resolve/index.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/resolve/index.cpp') diff --git a/src/resolve/index.cpp b/src/resolve/index.cpp index 5ebb2808..a8f92027 100644 --- a/src/resolve/index.cpp +++ b/src/resolve/index.cpp @@ -40,13 +40,15 @@ enum class IndexName void _add_item(const Span& sp, AST::Module& mod, IndexName location, const ::std::string& name, bool is_pub, ::AST::Path ir, bool error_on_collision=true) { - DEBUG("Add " << location << " item '" << name << "': " << ir); auto& list = get_mod_index(mod, location); bool was_import = (ir != mod.path() + name); if( was_import ) { DEBUG("### Import " << name << " = " << ir); } + else { + DEBUG("Add " << location << " item '" << name << "': " << ir); + } if( false == list.insert(::std::make_pair(name, ::AST::Module::IndexEnt { is_pub, was_import, mv$(ir) } )).second ) { if( error_on_collision ) @@ -55,7 +57,7 @@ void _add_item(const Span& sp, AST::Module& mod, IndexName location, const ::std } else { - DEBUG("Name collision " << mod.path() << ", ignored"); + DEBUG("Name collision in " << mod.path() << " - '" << name << "', ignored"); } } } -- cgit v1.2.3