diff options
author | John Hodge <tpg@ucc.asn.au> | 2017-10-01 11:06:23 +0800 |
---|---|---|
committer | John Hodge <tpg@ucc.asn.au> | 2017-10-01 11:06:23 +0800 |
commit | 43366c9e53791255159adbb2b391dd96749f9553 (patch) | |
tree | 276505e29bfa334b4625b3a481e8cad175a9ee0b /src | |
parent | a0ca5e5eb28932ed0efa14a4c5f981d097acbd51 (diff) | |
download | mrust-43366c9e53791255159adbb2b391dd96749f9553.tar.gz |
HIR Typecheck Expressions - Implement a TODO
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 { |