Adding 2 APInts

Why is there no facility to add 2 APInts with different bit widths? Everytime i do an operation on APInts i need to manually check and adjust their bitwidths. Is there no other better way to do it?

Sai Prajeeth wrote:

Why is there no facility to add 2 APInts with different bit widths?

APInts were built to model the operations in the IR. If you look at the IR, it's strongly typed and you're guaranteed to have the same bit width on both sides of any operation. If you don't, that's a seriously problem which we should assert on.

Everytime i do an operation on APInts i need to manually check and
adjust their bitwidths. Is there no other better way to do it?

Nope.

Nick