Trying to benefit from exception transparency

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Wed Aug 11 09:18:49 PDT 2010


On 11/08/10 16:55, Florian Weimer wrote:
> * Maurizio Cimadamore:
>
>    
>> On 10/08/10 11:51, Florian Weimer wrote:
>>      
>>> * Maurizio Cimadamore:
>>>
>>>
>>>        
>>>> The NPE is obviously a bug; the target type is required in this case
>>>> as you are accessing a member of 'this' (whose type is the very type
>>>> that needs to be inferred).
>>>>
>>>>          
>>> Then there's another bug.  I've got code which accesses a member of
>>> "this" without specifying the target type (but with Exception inferred
>>> as the exception).
>>>
>>>        
>> My answer covered both issues ;-)
>>      
> Ah, okay.  Is it true that
>
> tag:         tip
> user:        mcimadamore
> date:        Tue Aug 10 12:28:18 2010 +0100
> summary:     Superclasses of synthetic classes generated by Unlambda.java should be desugared first.
>
> only fixed one of them?  (Otherwise I'm even more confused.)
>
>    
That's true. I fixed the NPE as that was clearly a bug.

The other issue (compiler inferring Exception) is not a bug, but a 
limitation of the inference scheme when the compiler detects a loop when 
performing type-inference. We could issue a warning for that.

Maurizio


More information about the lambda-dev mailing list