diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/hir_typeck/expr_cs.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/hir_typeck/expr_cs.cpp b/src/hir_typeck/expr_cs.cpp index bd4af2ee..65e759bb 100644 --- a/src/hir_typeck/expr_cs.cpp +++ b/src/hir_typeck/expr_cs.cpp @@ -3018,6 +3018,29 @@ namespace { auto tmp = ::HIR::TypeRef(path.clone()); //auto tmp = ::HIR::TypeRef(); check_type_resolved_path(sp, path, tmp); + TU_MATCH(::HIR::Path::Data, (path.m_data), (pe), + (Generic, + for(auto& ty : pe.m_params.m_types) + ty = this->context.m_resolve.expand_associated_types(sp, mv$(ty)); + ), + (UfcsInherent, + *pe.type = this->context.m_resolve.expand_associated_types(sp, mv$(*pe.type)); + for(auto& ty : pe.params.m_types) + ty = this->context.m_resolve.expand_associated_types(sp, mv$(ty)); + for(auto& ty : pe.impl_params.m_types) + ty = this->context.m_resolve.expand_associated_types(sp, mv$(ty)); + ), + (UfcsKnown, + *pe.type = this->context.m_resolve.expand_associated_types(sp, mv$(*pe.type)); + for(auto& ty : pe.params.m_types) + ty = this->context.m_resolve.expand_associated_types(sp, mv$(ty)); + for(auto& ty : pe.trait.m_params.m_types) + ty = this->context.m_resolve.expand_associated_types(sp, mv$(ty)); + ), + (UfcsUnknown, + throw ""; + ) + ) } void check_type_resolved_path(const Span& sp, ::HIR::Path& path, const ::HIR::TypeRef& top_type) const { TU_MATCH(::HIR::Path::Data, (path.m_data), (pe), |