summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-07-10 20:53:31 +1000
committerJohn Hodge <tpg@mutabah.net>2016-07-10 20:53:31 +1000
commitdc623c66c51f0c2bf1b75e86aaa310b65f456d1b (patch)
treee5ff363a0929cfcb4427e2a5d5ad0cbedc05085d /src
parent89082fe9f176a02865f56c46b4b3d31b89857d9f (diff)
downloadmrust-dc623c66c51f0c2bf1b75e86aaa310b65f456d1b.tar.gz
HIR Typecheck CS - Mark result of a field access as unknown
Diffstat (limited to 'src')
-rw-r--r--src/hir_typeck/expr_cs.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/hir_typeck/expr_cs.cpp b/src/hir_typeck/expr_cs.cpp
index 89190fef..448e2ded 100644
--- a/src/hir_typeck/expr_cs.cpp
+++ b/src/hir_typeck/expr_cs.cpp
@@ -1593,6 +1593,9 @@ namespace {
void visit(::HIR::ExprNode_Field& node) override {
const auto& field_name = node.m_field;
TRACE_FUNCTION_F("(Field) name=" << field_name << ", ty = " << this->context.m_ivars.fmt_type(node.m_value->m_res_type));
+
+ this->context.equate_types_shadow(node.span(), node.m_res_type);
+
::HIR::TypeRef out_type;
// Using autoderef, locate this field