From 310c72f5dbd4bdce3c0d0cea59f17a594af5a8ba Mon Sep 17 00:00:00 2001 From: John Hodge Date: Fri, 5 Aug 2016 15:31:35 +0800 Subject: HIR Typecheck CS - Apply ivars to caches --- src/hir_typeck/expr_cs.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src') 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); } -- cgit v1.2.3