Hi Liam, I read the spec bugs, we had a similar discussion a few years ago about the scoping. Given how all implementations of javac have behaved for the last 4 years or so, I agree this is the right fix. Thanks for the extra test.
Ship it! cheers /Joel On Wed, Dec 19, 2018 at 8:19 PM Liam Miller-Cushon <cus...@google.com> wrote: > > Hi Joel, > > I think this fix is appropriate for the other uses of nestingForType. > > The underlying problem here is the treatment of nested types in general, > which directly affects getAnnotatedOwnerType, but also applies to the > examples in JDK-8066967. > > I added an additional test based on the one in JDK-8066967: > http://cr.openjdk.java.net/~cushon/8198526/webrev.02/ > > Re: JDK-8148504, javac consistently emits type_path_kind=1 entries for nested > types when there are multiple parts for which type annotations are > admissable. That wasn't consistent with JVMS 11, which expects > type_path_kind=1 entries for all nested types (regardless of whether the > enclosing type is admissable for annotations). The resolution was to update > the spec in JDK-8215035 and leave javac's behaviour unchanged, and this > change is updating reflection to be consistent with the updated spec and the > existing javac behaviour.