Merge pull request #111 from forflo/master

Resolved #110
This commit is contained in:
Stephen Williams 2016-07-05 07:50:52 -07:00 committed by GitHub
commit 70031c9d0f
2 changed files with 9 additions and 2 deletions

View File

@ -121,7 +121,11 @@ const VType* calculate_subtype_array(const YYLTYPE&loc, const char*base_name,
Expression*lef = tmpr->left();
Expression*rig = tmpr->right();
return calculate_subtype_array(loc, base_name, scope,
lef, tmpr->direction(), rig);
lef,
(tmpr->direction() == ExpRange::range_dir_t::DOWNTO
? true
: false),
rig);
}
sorrymsg(loc, "Don't know how to handle multiple ranges here.\n");

View File

@ -119,7 +119,10 @@ VTypeArray::VTypeArray(const VType*element, std::list<ExpRange*>*r, bool sv)
for (size_t idx = 0 ; idx < ranges_.size() ; idx += 1) {
ExpRange*curp = r->front();
r->pop_front();
ranges_[idx] = range_t(curp->msb(), curp->lsb(), curp->direction());
ranges_[idx] = range_t(curp->msb(), curp->lsb(),
(curp->direction() == ExpRange::range_dir_t::DOWNTO
? true
: false));
}
}