On Tue, 16 Jul 2024 18:02:57 GMT, Chen Liang <li...@openjdk.org> wrote:

> In annotated types, local and inner class types should be annotated as 
> "top-level" types. For example, in the test here
> 
>     public static Class<?> getLocalsMember() {
>         class Local {
>             class Member {
>                 @Annot(2635) Member(@Annot(2732) Local Local.this) {}
>             }
>         }
>         return Local.Member.class;
>     }
> 
> 
> The `Local` occurrences cannot be qualified with the enclosing class type, 
> even if the local class may be compiled to capture the enclosing class.
> 
> However, core reflection had a bug where it looks for an enclosing class 
> instead of a declaring class; this meant that for said `Local`, core 
> reflection was treating the outer class as the top-level in type annotations, 
> while the top level should be the local class instead. This patch fixes this 
> bug.

This pull request has been closed without being integrated.

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

PR: https://git.openjdk.org/jdk/pull/20200

Reply via email to