diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/hir_typeck/helpers.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/hir_typeck/helpers.cpp b/src/hir_typeck/helpers.cpp index 39324ea6..6eaf8528 100644 --- a/src/hir_typeck/helpers.cpp +++ b/src/hir_typeck/helpers.cpp @@ -1993,9 +1993,12 @@ void TraitResolution::expand_associated_types_inplace__UfcsKnown(const Span& sp, TU_IFLET(::HIR::TypeRef::Data, ty.m_data, Generic, e, if( e.binding == 0xFFFF ) return *pe_inner.type; + else if( e.binding >> 8 == 0 ) { + ASSERT_BUG(sp, e.binding < pe_inner.trait.m_params.m_types.size(), ""); + return pe_inner.trait.m_params.m_types.at(e.binding); + } else { - // TODO: Look in pe_inner.trait.m_params - TODO(sp, "Handle type params when expanding associated bound (#" << e.binding << " " << e.name); + TODO(sp, "Handle type params when expanding associated bound (#" << e.binding << " " << e.name << ")"); } ) else { |