On Thu, 4 Apr 2024 00:37:45 GMT, Vicente Romero <vrom...@openjdk.org> wrote:

>> Jan Lahoda has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Fixing tests.
>
> src/java.compiler/share/classes/javax/lang/model/element/ElementKind.java 
> line 133:
> 
>> 131:      */
>> 132:     
>> @PreviewFeature(feature=PreviewFeature.Feature.DERIVED_RECORD_CREATION, 
>> reflective=true)
>> 133:     COMPONENT_LOCAL_VARIABLE;
> 
> I wonder if we can't just use: LOCAL_VARIABLE

We could, and I was thinking of that. But, then I decided to go with a new 
kind, as I think it matches better the overall design of the Elements/Kinds. 
E.g. we have existing `EXCEPTION_PARAMETER` (used in `catch`) or 
`BINDING_VARIABLE`, rather than using `LOCAL_VARIABLE` for them.

(Also, many of these variable kinds have some small, but significant 
differences in semantics from `LOCAL_VARIABLE` - e.g. some are never blank/are 
always definitely assigned.)

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/18509#discussion_r1552385305

Reply via email to