diff options
author | John Hodge <tpg@mutabah.net> | 2016-11-24 12:13:07 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-11-24 12:13:07 +0800 |
commit | db711beb114c6b494aa5ce60358f7323073fa90d (patch) | |
tree | 9cd1c67cd533cb1b323e8a432f841ad16a7dc320 | |
parent | a9a662847252ce6d6e5050ce1d8eead53058ce9e (diff) | |
download | mrust-db711beb114c6b494aa5ce60358f7323073fa90d.tar.gz |
HIR Typecheck Expr - Allow inner coerce in match value
-rw-r--r-- | src/hir_typeck/expr_cs.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/hir_typeck/expr_cs.cpp b/src/hir_typeck/expr_cs.cpp index f26ec08f..1e1997b1 100644 --- a/src/hir_typeck/expr_cs.cpp +++ b/src/hir_typeck/expr_cs.cpp @@ -728,9 +728,10 @@ namespace { const auto& val_type = node.m_value->m_res_type; { - auto _ = this->push_inner_coerce_scoped(false); + auto _ = this->push_inner_coerce_scoped(true); this->context.add_ivars(node.m_value->m_res_type); - // TODO: If a coercion point is placed here, it will allow `match &string { "..." ... }` + + // TODO: If a coercion point (and ivar for the value) is placed here, it will allow `match &string { "..." ... }` node.m_value->visit( *this ); } |