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.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/hir/type.cpp b/src/hir/type.cpp
index f3ba220f..d324bc57 100644
--- a/src/hir/type.cpp
+++ b/src/hir/type.cpp
@@ -416,6 +416,7 @@ namespace {
}
::HIR::TypeRef::Compare HIR::TypeRef::compare_with_paceholders(const Span& sp, const ::HIR::TypeRef& x, ::std::function<const ::HIR::TypeRef&(const ::HIR::TypeRef&)> resolve_placeholder) const
{
+ TRACE_FUNCTION_F(*this << " ?= " << x);
assert( !this->m_data.is_Infer() );
const auto& right = (x.m_data.is_Infer() ? resolve_placeholder(x) : (x.m_data.is_Generic() ? resolve_placeholder(x) : x));
@@ -460,6 +461,9 @@ namespace {
throw "";
)
+ // If righthand is a type parameter, it can only match another type parameter
+ // - See `(Generic,` below
+
if( this->m_data.tag() != right.m_data.tag() ) {
return Compare::Unequal;
}