From 09ff85148320c7b0d9a4ed9678f0b98e907e94f5 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Fri, 25 Nov 2016 22:11:13 +0000 Subject: [PATCH] Fix for GitHub issue #130 part 2 : assertion failure on unsupported cast. (cherry picked from commit 7cac4677bf5d6f310d7a89da6e885d1a2d32c822) --- elab_expr.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/elab_expr.cc b/elab_expr.cc index 94a6b691a..6a98ceb04 100644 --- a/elab_expr.cc +++ b/elab_expr.cc @@ -2640,17 +2640,15 @@ NetExpr* PECastType::elaborate_expr(Design*des, NetScope*scope, if((base_->expr_type() != IVL_VT_BOOL) && (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); } return expr; } - cerr << get_fileline() << ": sorry: I don't know how to cast expression." << endl; - ivl_assert(*this, false); - - return expr; + cerr << get_fileline() << ": sorry: This cast operation is not yet supported." << endl; + return 0; } unsigned PEConcat::test_width(Design*des, NetScope*scope, width_mode_t&)