From 02dd13bc999924a010d4ac6b8769fae0f947178f Mon Sep 17 00:00:00 2001 From: John Hodge Date: Thu, 13 Oct 2016 07:30:18 +0800 Subject: HIR Typecheck Expr - Shadow into borrows of tuples --- src/hir_typeck/expr_cs.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') diff --git a/src/hir_typeck/expr_cs.cpp b/src/hir_typeck/expr_cs.cpp index e7fac500..c6d15a21 100644 --- a/src/hir_typeck/expr_cs.cpp +++ b/src/hir_typeck/expr_cs.cpp @@ -3513,13 +3513,22 @@ void Context::equate_types_shadow(const Span& sp, const ::HIR::TypeRef& l) 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) -- cgit v1.2.3