Fix for GitHub issue #130 part 2 : assertion failure on unsupported cast.

This commit is contained in:
Martin Whitaker 2016-11-25 22:11:13 +00:00
parent 002f118bb5
commit 7cac4677bf
1 changed files with 3 additions and 5 deletions

View File

@ -2648,17 +2648,15 @@ NetExpr* PECastType::elaborate_expr(Design*des, NetScope*scope,
if((base_->expr_type() != IVL_VT_BOOL) && if((base_->expr_type() != IVL_VT_BOOL) &&
(base_->expr_type() != IVL_VT_LOGIC)) { (base_->expr_type() != IVL_VT_LOGIC)) {
cerr << get_fileline() << ": cannot be casted to string." << endl; cerr << get_fileline() << ": cannot be cast to a string." << endl;
ivl_assert(*this, false); ivl_assert(*this, false);
} }
return expr; return expr;
} }
cerr << get_fileline() << ": sorry: I don't know how to cast expression." << endl; cerr << get_fileline() << ": sorry: This cast operation is not yet supported." << endl;
ivl_assert(*this, false); return 0;
return expr;
} }
unsigned PEConcat::test_width(Design*des, NetScope*scope, width_mode_t&) unsigned PEConcat::test_width(Design*des, NetScope*scope, width_mode_t&)