diff options
author | John Hodge <tpg@mutabah.net> | 2016-09-24 16:11:45 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-09-24 16:11:45 +0800 |
commit | 00fe2ba047251b0178681ce818a73003ab449785 (patch) | |
tree | 05115158f2b18fa0d791c6cae6860d678b88e3d8 /src | |
parent | 65ed9faae6cc318caf440ad5f04d63e09d83a1f5 (diff) | |
download | mrust-00fe2ba047251b0178681ce818a73003ab449785.tar.gz |
HIR Typecheck Expr - Prevent ivar defaulting of closure arguments when closure is possibly unknown
Diffstat (limited to 'src')
-rw-r--r-- | src/hir_typeck/expr_cs.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/hir_typeck/expr_cs.cpp b/src/hir_typeck/expr_cs.cpp index f5d234e4..32cdf7bb 100644 --- a/src/hir_typeck/expr_cs.cpp +++ b/src/hir_typeck/expr_cs.cpp @@ -3132,6 +3132,11 @@ void Context::equate_types_shadow(const Span& sp, const ::HIR::TypeRef& l) ) ) ), + (Closure, + for(const auto& aty : e.m_arg_types) + this->equate_types_shadow(sp, aty); + this->equate_types_shadow(sp, *e.m_rettype); + ), (Infer, this->possible_equate_type_disable(e.index); ) |