Skip to content

Commit

Permalink
HIR Typecheck Validate - Proper handling of bound HRTBs
Browse files Browse the repository at this point in the history
  • Loading branch information
thepowersgang committed Apr 2, 2024
1 parent b28f29d commit 0d6e52a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/hir_typeck/expr_check.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -829,11 +829,13 @@ namespace {
TU_ARMA(TypeLifetime, be) {
}
TU_ARMA(TraitBound, be) {
HIR::GenericParams empty_hrtb;
auto _ = cache.m_monomorph->push_hrb(be.hrtbs ? *be.hrtbs : empty_hrtb);
DEBUG("Bound " << be.type << ": " << be.trait);
auto real_type = cache.m_monomorph->monomorph_type(sp, be.type);
m_resolve.expand_associated_types(sp, real_type);
auto real_trait = cache.m_monomorph->monomorph_traitpath(sp, be.trait, false);
m_resolve.expand_associated_types_tp(sp, real_trait);
DEBUG("Bound " << be.type << ": " << be.trait);
DEBUG("= (" << real_type << ": " << real_trait << ")");
const auto& trait_params = real_trait.m_path.m_params;

Expand Down

0 comments on commit 0d6e52a

Please sign in to comment.