Automatic Resource Management, V.2
Joshua Bloch
jjb at google.com
Tue Apr 21 08:34:40 PDT 2009
Neal,
Yes, this is the situation that Bruce Chapman pointed out earlier. As a
practical matter, I suspect that resources will have rather simple types,
but still the spec does have to cover this situation. If you have a good
solution, feel free to share. Otherwise, hang on, and we'll see what we can
come up with.
Josh
On Tue, Apr 21, 2009 at 8:00 AM, Neal Gafter <neal at gafter.com> wrote:
> On Sun, Apr 19, 2009 at 11:45 PM, Joshua Bloch <jjb at google.com> wrote:
>
>> The variable #localVar is a compiler-generated identifier distinct from
>> any
>> other identifiers (compiler-generated or otherwise) that are in scope (JLS
>> §6.3) at the point where the automatic resource management statement
>> occurs.
>> The *Type *in the above desugaring is replaced by the static type of *
>> Expression*.
>>
>
> This introduces the possibility of local variables with intersection and
> recursive types. Such variables could not have occurred previously because
> they are not denotable. I believe there are three tables in the class file
> format that may be affected. Can you please include in the specification a
> description of how you want them handled?
>
More information about the coin-dev
mailing list