diff options
author | John Hodge (sonata) <tpg@mutabah.net> | 2015-01-15 11:44:12 +0800 |
---|---|---|
committer | John Hodge (sonata) <tpg@mutabah.net> | 2015-01-15 11:44:12 +0800 |
commit | 3044ae80284fb958051ffd2926fcbff470ff8591 (patch) | |
tree | e09bd7461c76118926426acad388c315a86e4703 /src/ast/path.cpp | |
parent | 801bce6026e86d32b6971463a3aefd38eb3b2f27 (diff) | |
download | mrust-3044ae80284fb958051ffd2926fcbff470ff8591.tar.gz |
Type alias bound to path, considering removing std hack and implementing AST read
Diffstat (limited to 'src/ast/path.cpp')
-rw-r--r-- | src/ast/path.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/ast/path.cpp b/src/ast/path.cpp index e6700696..636c4166 100644 --- a/src/ast/path.cpp +++ b/src/ast/path.cpp @@ -103,7 +103,14 @@ void Path::resolve(const Crate& root_crate) throw ParseError::Generic("Param count mismatch when referencing type alias"); // Make a copy of the path, replace params with it, then replace *this? // - Maybe leave that up to other code? - throw ParseError::Todo("Path::resolve() type alias"); + if( is_last ) { + m_binding_type = ALIAS; + m_binding.alias = &it->data; + return ; + } + else { + throw ParseError::Todo("Path::resolve() type method"); + } } } |