summaryrefslogtreecommitdiff
path: root/src/hir/type.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/hir/type.cpp')
-rw-r--r--src/hir/type.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/hir/type.cpp b/src/hir/type.cpp
index ff4742e6..ccd5cd21 100644
--- a/src/hir/type.cpp
+++ b/src/hir/type.cpp
@@ -789,6 +789,20 @@ bool ::HIR::TypeRef::match_test_generics(const Span& sp, const ::HIR::TypeRef& x
assert(!"Fell off end of clone_binding");
throw "";
}
+bool HIR::TypeRef::TypePathBinding::operator==(const HIR::TypeRef::TypePathBinding& x) const
+{
+ if( this->tag() != x.tag() )
+ return false;
+ TU_MATCH(::HIR::TypeRef::TypePathBinding, (*this, x), (te, xe),
+ (Unbound, return true;),
+ (Opaque, return true;),
+ (ExternType, return te == xe;),
+ (Struct, return te == xe;),
+ (Union , return te == xe;),
+ (Enum , return te == xe;)
+ )
+ throw "";
+}
::HIR::TypeRef HIR::TypeRef::clone() const