summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-10-28 11:43:28 +0800
committerJohn Hodge <tpg@mutabah.net>2016-10-28 11:45:20 +0800
commit9431b180c93115cfa5f34b88b4b27d2b05074877 (patch)
tree602a48ed28f549457958d71d4518e0167abd417d /src
parent5a2bb22435e3da9250c129ed0a27ca9d4e5feaf9 (diff)
downloadmrust-9431b180c93115cfa5f34b88b4b27d2b05074877.tar.gz
HIR Typecheck Expr - Shadow type params
Diffstat (limited to 'src')
-rw-r--r--src/hir_typeck/expr_cs.cpp25
1 files changed, 10 insertions, 15 deletions
diff --git a/src/hir_typeck/expr_cs.cpp b/src/hir_typeck/expr_cs.cpp
index 0144f833..768bc8fe 100644
--- a/src/hir_typeck/expr_cs.cpp
+++ b/src/hir_typeck/expr_cs.cpp
@@ -3625,27 +3625,22 @@ void Context::equate_types_shadow(const Span& sp, const ::HIR::TypeRef& l)
(
// TODO: Shadow sub-types too
),
+ (Path,
+ TU_MATCH_DEF( ::HIR::Path::Data, (e.path.m_data), (pe),
+ (
+ ),
+ (Generic,
+ for(const auto& sty : pe.m_params.m_types)
+ this->equate_types_shadow(sp, sty);
+ )
+ )
+ ),
(Tuple,
for(const auto& sty : e)
this->equate_types_shadow(sp, sty);
),
(Borrow,
- // TODO: Should this just recurse?
- #if 1
this->equate_types_shadow(sp, *e.inner);
- #else
- TU_MATCH_DEF(::HIR::TypeRef::Data, (this->get_type(*e.inner).m_data), (e2),
- (
- ),
- (Tuple,
- for(const auto& sty : e2)
- this->equate_types_shadow(sp, sty);
- ),
- (Infer,
- this->possible_equate_type_disable(e2.index);
- )
- )
- #endif
),
(Closure,
for(const auto& aty : e.m_arg_types)