diff options
author | John Hodge <tpg@ucc.asn.au> | 2016-08-05 15:31:35 +0800 |
---|---|---|
committer | John Hodge <tpg@ucc.asn.au> | 2016-08-05 15:31:35 +0800 |
commit | 310c72f5dbd4bdce3c0d0cea59f17a594af5a8ba (patch) | |
tree | 8d358dc3a5a45e2742895b1633afeb374d5fd516 /src | |
parent | 58e5acc9ca0ef49c2b24d749603790ea3f255019 (diff) | |
download | mrust-310c72f5dbd4bdce3c0d0cea59f17a594af5a8ba.tar.gz |
HIR Typecheck CS - Apply ivars to caches
Diffstat (limited to 'src')
-rw-r--r-- | src/hir_typeck/expr_cs.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/hir_typeck/expr_cs.cpp b/src/hir_typeck/expr_cs.cpp index 7bbcc1c9..777ae1cc 100644 --- a/src/hir_typeck/expr_cs.cpp +++ b/src/hir_typeck/expr_cs.cpp @@ -1943,6 +1943,21 @@ namespace { } void visit(::HIR::ExprNode_StructLiteral& node) override { this->check_type_resolved_pp(node.span(), node.m_path.m_params, ::HIR::TypeRef()); + for(auto& ty : node.m_value_types) { + if( ty != ::HIR::TypeRef() ) { + this->check_type_resolved_top(node.span(), ty); + } + } + + ::HIR::ExprVisitorDef::visit(node); + } + void visit(::HIR::ExprNode_TupleVariant& node) override { + this->check_type_resolved_pp(node.span(), node.m_path.m_params, ::HIR::TypeRef()); + for(auto& ty : node.m_arg_types) { + if( ty != ::HIR::TypeRef() ) { + this->check_type_resolved_top(node.span(), ty); + } + } ::HIR::ExprVisitorDef::visit(node); } |