A ternary can be signed.

If the two branches of a ternary are signed then the result will
also be signed.
This commit is contained in:
Cary R 2009-12-16 18:14:07 -08:00 committed by Stephen Williams
parent 47d3b3365b
commit 260828a095
1 changed files with 1 additions and 0 deletions

View File

@ -3417,6 +3417,7 @@ NetExpr*PETernary::elaborate_expr(Design*des, NetScope*scope,
fal = pad_to_width(fal, use_wid, *this);
NetETernary*res = new NetETernary(con, tru, fal);
res->cast_signed(tru->has_sign() && fal->has_sign());
res->set_line(*this);
return res;
}