Hi Jia,
Jia Ramharai wrote:
Output:
Byte, Byte
Because widening beats var-args
This example does not demonstrate that widening beats var-args.
It shows that boxing beats var-args.
Jia Ramharai wrote:
Output:
byte...
???
Why doesn't widening take place instead of var-args?
It's not just widening that would be required.
There would have to be a widening from byte to integer, followed by boxing to Integer.
Seems this is asking too much of the compiler (K&B p252).
Regards
Richard