-
Bug
-
Resolution: Duplicate
-
P2
-
None
-
None
In this case,
class TestOne<T> { // TestN.class
Object mtest( TestOne<T> t){ return null; }
public void test() {
mtest( new TestOne<T>() { // TestN$1
class InnerAnon<U> { // TestN$1$InnerAnon.class
@F String ia_m1(){ return null; };
}
InnerAnon<String> IA = new InnerAnon< String>();
});
}
}
@Retention(RUNTIME) @Target(TYPE_USE) @interface F { }
@F is written to class file as a regular annotation on ia_m1().
class TestOne<T> { // TestN.class
Object mtest( TestOne<T> t){ return null; }
public void test() {
mtest( new TestOne<T>() { // TestN$1
class InnerAnon<U> { // TestN$1$InnerAnon.class
@F String ia_m1(){ return null; };
}
InnerAnon<String> IA = new InnerAnon< String>();
});
}
}
@Retention(RUNTIME) @Target(TYPE_USE) @interface F { }
@F is written to class file as a regular annotation on ia_m1().
- duplicates
-
JDK-8008762 Type annotation on inner class in anonymous class show up as regular type annotations
- Closed