diff options
author | John Hodge <tpg@mutabah.net> | 2016-10-29 13:26:52 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-10-29 13:26:52 +0800 |
commit | f5420b8174f7acf062f4c5d682820019d79cbdaf (patch) | |
tree | d6c6cdb63a0be8b754d618395d0ffa7443eb2352 /src/hir/visitor.cpp | |
parent | d8fed3a1def1ae667c1471f44b19749a1f88cc42 (diff) | |
download | mrust-f5420b8174f7acf062f4c5d682820019d79cbdaf.tar.gz |
HIR Types - Store array size expr as a shared_ptr to allow cloning
Diffstat (limited to 'src/hir/visitor.cpp')
-rw-r--r-- | src/hir/visitor.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/hir/visitor.cpp b/src/hir/visitor.cpp index 42713c36..64458901 100644 --- a/src/hir/visitor.cpp +++ b/src/hir/visitor.cpp @@ -303,7 +303,8 @@ void ::HIR::Visitor::visit_type(::HIR::TypeRef& ty) ), (Array, this->visit_type( *e.inner ); - this->visit_expr( e.size ); + if( e.size ) + this->visit_expr( *e.size ); ), (Slice, this->visit_type( *e.inner ); |