diff options
author | John Hodge <tpg@mutabah.net> | 2016-10-13 07:30:18 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-10-13 07:30:18 +0800 |
commit | 02dd13bc999924a010d4ac6b8769fae0f947178f (patch) | |
tree | ea3c87f2d72e6de480e40cad526a2c44efc4465c | |
parent | db9f12f158444c94a9e625461ed1424dd9baf8a5 (diff) | |
download | mrust-02dd13bc999924a010d4ac6b8769fae0f947178f.tar.gz |
HIR Typecheck Expr - Shadow into borrows of tuples
-rw-r--r-- | src/hir_typeck/expr_cs.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
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) |