Skip to content

Commit

Permalink
Typecheck Expressions - Allow more bound impls to be considered
Browse files Browse the repository at this point in the history
  • Loading branch information
thepowersgang committed Jan 17, 2024
1 parent 876a2c3 commit 0be9e89
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/hir_typeck/helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2642,7 +2642,10 @@ bool TraitResolution::find_trait_impls_bound(const Span& sp, const ::HIR::Simple
assoc_info = e->path.m_data.opt_UfcsKnown();
}

if(type.data().is_Infer()) {
// If the type is a fully unknown type, then don't bother looking?
// - Ah, but what if the prams provide sufficient information?
// - TODO: Determine if the params could provide enough info to be worth checking for bounds.
if(type.data().is_Infer() && !type.data().as_Infer().is_lit()) {
return false;
}

Expand Down

0 comments on commit 0be9e89

Please sign in to comment.