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 f17613ea..c9f3fe85 100644
--- a/src/hir/type.cpp
+++ b/src/hir/type.cpp
@@ -575,6 +575,11 @@ bool ::HIR::TypeRef::match_test_generics(const Span& sp, const ::HIR::TypeRef& x
DEBUG("- Fuzzy match due to opaque");
return Compare::Fuzzy;
}
+ // HACK: If the RHS is a placeholder generic, allow it.
+ if( x.m_data.is_Generic() && (x.m_data.as_Generic().binding >> 8) == 2 ) {
+ DEBUG("- Fuzzy match due to placeholder");
+ return Compare::Fuzzy;
+ }
DEBUG("- Tag mismatch " << v << " and " << x);
return Compare::Unequal;
}