Catch case of select expression on non-variable

This commit is contained in:
Nick Gasson 2008-07-24 16:00:12 +01:00
parent d3296d4895
commit 5a09819729
2 changed files with 5 additions and 3 deletions

View File

@ -355,8 +355,10 @@ static vhdl_expr *translate_select(ivl_expr_t e)
{
vhdl_var_ref *from =
dynamic_cast<vhdl_var_ref*>(translate_expr(ivl_expr_oper1(e)));
if (NULL == from)
if (NULL == from) {
error("Can only select from variable reference");
return NULL;
}
ivl_expr_t o2 = ivl_expr_oper2(e);
if (o2) {