From 31f52948a429ec814e24737193c98324997503ae Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sun, 7 Jan 2024 11:26:08 +0800 Subject: [PATCH] HIR Typecheck - Tweak matching of const generics --- src/hir_typeck/helpers.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/hir_typeck/helpers.cpp b/src/hir_typeck/helpers.cpp index 2fbb0fe0..85c7b52a 100644 --- a/src/hir_typeck/helpers.cpp +++ b/src/hir_typeck/helpers.cpp @@ -3148,6 +3148,12 @@ ::HIR::Compare TraitResolution::ftic_check_params(const Span& sp, const ::HIR::S if( out_impl_params.m_values[g.binding] == sz ) { return ::HIR::Compare::Equal; } + if( out_impl_params.m_values[g.binding].is_Infer() ) { + return ::HIR::Compare::Fuzzy; + } + if( sz.is_Infer() ) { + return ::HIR::Compare::Fuzzy; + } TODO(Span(), "PtrImplMatcher::match_val " << g << "(" << out_impl_params.m_values[g.binding] << ") with " << sz); } }