Catch case of select expression on non-variable
This commit is contained in:
parent
d3296d4895
commit
5a09819729
|
|
@ -162,7 +162,7 @@ int draw_stask_display(vhdl_procedural *proc, stmt_container *container,
|
|||
}
|
||||
else {
|
||||
vhdl_expr *base = translate_expr(net);
|
||||
if (NULL == base)
|
||||
if (NULL == base)
|
||||
return 1;
|
||||
|
||||
display_write(container, base);
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
@ -454,7 +456,7 @@ vhdl_expr *translate_expr(ivl_expr_t e)
|
|||
{
|
||||
assert(e);
|
||||
ivl_expr_type_t type = ivl_expr_type(e);
|
||||
|
||||
|
||||
switch (type) {
|
||||
case IVL_EX_STRING:
|
||||
return translate_string(e);
|
||||
|
|
|
|||
Loading…
Reference in New Issue