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.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/hir/type.cpp b/src/hir/type.cpp
index 70ce2599..3bdff34e 100644
--- a/src/hir/type.cpp
+++ b/src/hir/type.cpp
@@ -515,6 +515,11 @@ bool ::HIR::TypeRef::match_test_generics(const Span& sp, const ::HIR::TypeRef& x
//const auto& left = *this;
const auto& right = (x.m_data.is_Infer() ? resolve_placeholder(x) : (x.m_data.is_Generic() ? resolve_placeholder(x) : x));
+ // If the two types are the same ivar, return equal
+ if( left.m_data.is_Infer() && left == right ) {
+ return Compare::Equal;
+ }
+
// If left is infer
TU_IFLET(::HIR::TypeRef::Data, left.m_data, Infer, e,
switch(e.ty_class)