diff options
author | John Hodge <tpg@mutabah.net> | 2016-07-12 17:48:19 +1000 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-07-12 17:48:19 +1000 |
commit | 5b9453c63f1bc791e23b92a08017d7b10fb3415b (patch) | |
tree | 67db5eacebab29cba9e0987895f1f77fad322c71 /src | |
parent | fa7bc272c17a1fa4401ae3733984e338ff95443b (diff) | |
download | mrust-5b9453c63f1bc791e23b92a08017d7b10fb3415b.tar.gz |
HIR Typecheck - Extra defence
Diffstat (limited to 'src')
-rw-r--r-- | src/hir_typeck/helpers.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/hir_typeck/helpers.cpp b/src/hir_typeck/helpers.cpp index 6f022f68..b7415a8a 100644 --- a/src/hir_typeck/helpers.cpp +++ b/src/hir_typeck/helpers.cpp @@ -1756,6 +1756,7 @@ bool TraitResolution::find_trait_impls_crate(const Span& sp, }; auto monomorph = [&](const auto& gt)->const auto& { const auto& ge = gt.m_data.as_Generic(); + ASSERT_BUG(sp, ge.binding >> 8 != 2, ""); assert( ge.binding < impl_params.size() ); if( !impl_params[ge.binding] ) { //BUG(sp, "Param " << ge.binding << " for `impl" << impl.m_params.fmt_args() << " " << trait << impl.m_trait_args << " for " << impl.m_type << "` wasn't constrained"); @@ -1836,6 +1837,7 @@ bool TraitResolution::find_trait_impls_crate(const Span& sp, { types.insert( ::std::make_pair(aty.first, this->expand_associated_types(sp, monomorphise_type_with(sp, aty.second, monomorph))) ); } + // TODO: Ensure that there are no-longer any magic params DEBUG("[find_trait_impls_crate] callback(args=" << args_mono << ", assoc={" << types << "})"); //if( match == ::HIR::Compare::Fuzzy ) { |