In the following code:
class Outer {
public static class Inner {}
}
public class Test {
public Object meth() { return new Outer.@X Inner(); }
}
The type path of the annotation @X is empty. It should be [INNER_TYPE].
Note that in the slightly different code
class Outer {
public class Inner {}
}
public class Test {
public Object meth() { Outer o = new Outer(); return o.new @X Inner(); }
}
The type path is correct.
|