summaryrefslogtreecommitdiff
path: root/src/resolve/use.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resolve/use.cpp')
-rw-r--r--src/resolve/use.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/resolve/use.cpp b/src/resolve/use.cpp
index 44d50516..c2079bdd 100644
--- a/src/resolve/use.cpp
+++ b/src/resolve/use.cpp
@@ -256,7 +256,8 @@ void Resolve_Use_Mod(const ::AST::Crate& crate, ::AST::Module& mod, ::AST::Path
if( idx >= mod.anon_mods().size() ) {
BUG(span, "Invalid anon path segment '" << des_item_name << "'");
}
- return ::AST::PathBinding::make_Module({mod.anon_mods()[idx]});
+ assert( mod.anon_mods()[idx] );
+ return ::AST::PathBinding::make_Module({&*mod.anon_mods()[idx]});
}
// Seach for the name defined in the module.