Consider an expression like:
assign x = func(A) ^ func(B);
where the output of the func is 32 bits wide, and x is a wire of 16 bits. I want to assign only the lowest 16 bits of the resulting xor.
I know the above code already does that, but it also generates a warning. The "obvious" approach doesn't work:
assign x = (func(A) ^ func(B))[15:0]; // error: '[' is unexpected