diff options
author | John Hodge <tpg@mutabah.net> | 2017-08-22 21:22:09 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2017-08-22 21:22:09 +0800 |
commit | 0eb50366561cd91bed78b3e721e6ea94dbecded1 (patch) | |
tree | 53dd1ab175275bfe902d36a9deda5219b9003442 /src/mir/helpers.cpp | |
parent | 251e49aef76e46af5005978ac25650aab4f94313 (diff) | |
download | mrust-0eb50366561cd91bed78b3e721e6ea94dbecded1.tar.gz |
Typecheck/MIR - Some missing EAT invocations
Diffstat (limited to 'src/mir/helpers.cpp')
-rw-r--r-- | src/mir/helpers.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mir/helpers.cpp b/src/mir/helpers.cpp index b90f3cf6..10c9c780 100644 --- a/src/mir/helpers.cpp +++ b/src/mir/helpers.cpp @@ -287,8 +287,11 @@ const ::HIR::TypeRef& MIR::TypeResolve::get_param_type(::HIR::TypeRef& tmp, cons auto v = m_resolve.get_value(this->sp, e.p, p, /*signature_only=*/true); if( const auto* ve = v.opt_Constant() ) { const auto& ty = (*ve)->m_type; - if( monomorphise_type_needed(ty) ) - MIR_TODO(*this, "get_const_type - Monomorphise type " << ty); + if( monomorphise_type_needed(ty) ) { + auto rv = p.monomorph(this->sp, ty); + m_resolve.expand_associated_types(this->sp, rv); + return rv; + } else return ty.clone(); } |