summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/hir/hir.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hir/hir.cpp b/src/hir/hir.cpp
index 14a84d86..65a87d7a 100644
--- a/src/hir/hir.cpp
+++ b/src/hir/hir.cpp
@@ -38,7 +38,7 @@ namespace {
bool matches_type_int(const ::HIR::GenericParams& params, const ::HIR::TypeRef& left, const ::HIR::TypeRef& right_in, ::HIR::t_cb_resolve_type ty_res, bool expand_generic)
{
assert(! left.m_data.is_Infer() );
- const auto& right = (right_in.m_data.is_Infer() || right_in.m_data.is_Generic() == expand_generic ? ty_res(right_in) : right_in);
+ const auto& right = (right_in.m_data.is_Infer() || (right_in.m_data.is_Generic() && expand_generic) ? ty_res(right_in) : right_in);
if( right_in.m_data.is_Generic() )
expand_generic = false;