diff options
Diffstat (limited to 'src/resolve/absolute.cpp')
-rw-r--r-- | src/resolve/absolute.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/resolve/absolute.cpp b/src/resolve/absolute.cpp index 646e4aaf..1077702a 100644 --- a/src/resolve/absolute.cpp +++ b/src/resolve/absolute.cpp @@ -1361,7 +1361,10 @@ void Resolve_Absolute_Path(/*const*/ Context& context, const Span& sp, Context:: // - Determine how many components of the `self` path to use const auto& mp_nodes = context.m_mod.path().nodes(); assert( e.count >= 1 ); + // TODO: The first super should ignore any anon modules. unsigned int start_len = e.count > mp_nodes.size() ? 0 : mp_nodes.size() - e.count; + while( start_len > 0 && mp_nodes[start_len-1].name()[0] == '#' ) + start_len --; // - Create a new path ::AST::Path np("", {}); @@ -1372,8 +1375,6 @@ void Resolve_Absolute_Path(/*const*/ Context& context, const Span& sp, Context:: for(auto& en : e.nodes) np_nodes.push_back( mv$(en) ); - // TODO: Resolve to the actual item? - if( !path.is_trivial() ) Resolve_Absolute_PathNodes(context, sp, np_nodes); |