diff options
author | John Hodge <tpg@mutabah.net> | 2016-02-18 18:41:39 +1100 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-02-18 18:41:39 +1100 |
commit | 651ab293f3bfa117dae618edb9a4a9f328e07a91 (patch) | |
tree | d8a7ce58aa58a018a1f86aa5fa3f73e57e6c238a /src/ast/path.cpp | |
parent | 13075f30738556212ca0ff02d28dab75c268c1fd (diff) | |
download | mrust-651ab293f3bfa117dae618edb9a4a9f328e07a91.tar.gz |
Random commit
Diffstat (limited to 'src/ast/path.cpp')
-rw-r--r-- | src/ast/path.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ast/path.cpp b/src/ast/path.cpp index 1703da53..9ad36515 100644 --- a/src/ast/path.cpp +++ b/src/ast/path.cpp @@ -335,6 +335,9 @@ bool Path::is_concrete() const /// cause two different paths to look the same. int Path::equal_no_generic(const Path& x) const { + if( m_class.is_Invalid() && x.m_class.is_Invalid() ) + return 0; + DEBUG("equal_no_generic(this = " << *this << ", x = " << x << ")"); if( m_class.tag() != x.m_class.tag() ) return -1; if( m_crate != x.m_crate ) @@ -435,6 +438,8 @@ void Path::print_pretty(::std::ostream& os, bool is_type_context) const TU_MATCH(Path::Class, (m_class), (ent), (Invalid, os << "/*inv*/"; + // NOTE: Don't print the binding for invalid paths + return ; ), (Local, // Only print comment if there's no binding |