diff options
-rw-r--r-- | src/hir/deserialise.cpp | 5 | ||||
-rw-r--r-- | src/hir_conv/bind.cpp | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/hir/deserialise.cpp b/src/hir/deserialise.cpp index 0b11b4dd..e4fc6bc1 100644 --- a/src/hir/deserialise.cpp +++ b/src/hir/deserialise.cpp @@ -674,11 +674,12 @@ namespace { TRACE_FUNCTION; // HACK! If the read crate name is empty, replace it with the name we're loaded with auto crate_name = m_in.read_string(); - if( crate_name == "" ) + auto components = deserialise_vec< ::std::string>(); + if( crate_name == "" && components.size() > 0) crate_name = m_crate_name; return ::HIR::SimplePath { mv$(crate_name), - deserialise_vec< ::std::string>() + mv$(components) }; } ::HIR::PathParams HirDeserialiser::deserialise_pathparams() diff --git a/src/hir_conv/bind.cpp b/src/hir_conv/bind.cpp index 911abd1f..ab74598e 100644 --- a/src/hir_conv/bind.cpp +++ b/src/hir_conv/bind.cpp @@ -516,6 +516,10 @@ namespace { ) } }; + for(auto& ty : expr.m_mir->named_variables) + this->visit_type(ty); + for(auto& ty : expr.m_mir->temporaries) + this->visit_type(ty); for(auto& block : expr.m_mir->blocks) { for(auto& stmt : block.statements) |