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:
parent
47d3b3365b
commit
260828a095
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue