hg: jdk7/tl/langtools: 6979683: inconsistent interaction of reference cast with box/unbox conversions leaves out a useful case
Ulf.Zibis at gmx.de
Thu Sep 2 11:21:50 PDT 2010
is Bug ID: 6775385 NPE caused by ConditionalExpression and auto-boxing failure
concerned by this bug ?
Am 02.09.2010 03:54, schrieb John Rose:
> On Sep 1, 2010, at 6:31 PM, Neal Gafter wrote:
>> I also can't find any general rule about casting being allowed to do the reverse of multi-step conversions, which seems to be your "bottom line" justification.
> By your reading, what is the spec. support for (Object)(int)x? (I.e., (Object)n, where 'n' is 'int'?)
> I think the spec. support for (Object)(int) is the use of combined steps from the first para. of 5.5.
> If that is the case, there is no reason to deny (int)(Object) its place in the twilight.
> (Yes, I agree the spec. is gray here. There is an umbrella proposal to bring clarity to it, mentioned in the final paragraph of my bug report.)
> Do you have an alternative reading of the spec. that allows (Object)(int) but not (int)(Object)?
> -- John
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the compiler-dev