From 651ab293f3bfa117dae618edb9a4a9f328e07a91 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Thu, 18 Feb 2016 18:41:39 +1100 Subject: Random commit --- src/ast/path.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/ast/path.cpp') 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 -- cgit v1.2.3