summaryrefslogtreecommitdiff
path: root/src/resolve/use.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-08-30 22:00:02 +0800
committerJohn Hodge <tpg@mutabah.net>2016-08-30 22:00:02 +0800
commit737e1e2c4385852221968dee8fe21be09c342e24 (patch)
tree76ea12bb746d91b91e782ccf3b8bc7ee5bcd555e /src/resolve/use.cpp
parentd89247a76fc4546aa90f4e94dd03788e07d045b2 (diff)
downloadmrust-737e1e2c4385852221968dee8fe21be09c342e24.tar.gz
Resolve Use - Notes on handling mutiple bindings
Diffstat (limited to 'src/resolve/use.cpp')
-rw-r--r--src/resolve/use.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/resolve/use.cpp b/src/resolve/use.cpp
index f977f0d1..9c280500 100644
--- a/src/resolve/use.cpp
+++ b/src/resolve/use.cpp
@@ -77,10 +77,8 @@ void Resolve_Use_Mod(const ::AST::Crate& crate, ::AST::Module& mod, ::AST::Path
if( !use_stmt.data.path.m_class.is_Absolute() )
BUG(span, "Use path is not absolute after absolutisation");
- // TODO: Is this a valid assertion?
- //if( use_stmt.data.path.crate() != "" )
- // BUG(span, "Use path crate was set before resolve");
-
+ // TODO: Handle case where a use can resolve to two different items (one value, one type/namespace)
+ // - Easiest way is with an extra binding slot
use_stmt.data.path.bind( Resolve_Use_GetBinding(span, crate, use_stmt.data.path, parent_modules) );
// - If doing a glob, ensure the item type is valid