> Hi everyone,
>
> I'm trying to do widening and then boxing, but it's impossible. Can
> anyone tell me the reason?
> Why is that behaviour useful?
JLS 5.3 (Method Invocation Conversion) mentions that Method invocation
contexts allow the use of one of identity, widening primitive or
reference, boxing and unboxing conversion. Though it does not
specifically say so, this implies that more then one conversion is not
allowed.
No rationale is provided, but I assume it is to not further complicate
the already complex overload resolution rules.
> class WB {
> static void go(Integer x) { System.out.println("Integer"); }
[quoted text clipped - 7 lines]
>
> Mario