diff options
Diffstat (limited to 'src/types.cpp')
-rw-r--r-- | src/types.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/types.cpp b/src/types.cpp index 9d2e42d4..1925e579 100644 --- a/src/types.cpp +++ b/src/types.cpp @@ -378,8 +378,16 @@ Ordering TypeRef::ord(const TypeRef& x) const } return OrdEqual; case TypeRef::GENERIC: - DEBUG(*this << " == " << x); - throw ::std::runtime_error("BUGCHECK - Can't compare generic type"); + if( m_tagged_ptr != x.m_tagged_ptr ) + { + DEBUG(*this << " == " << x); + if( m_tagged_ptr ) DEBUG("- (L) " << *type_params_ptr()); + if( x.m_tagged_ptr ) DEBUG("- (R) " << *x.type_params_ptr()); + throw ::std::runtime_error("BUGCHECK - Can't compare mismatched generic types"); + } + else { + } + return m_path.ord( x.m_path ); case TypeRef::PATH: return m_path.ord( x.m_path ); case TypeRef::MULTIDST: |