-
Type:
Sub-task
-
Resolution: Fixed
-
Priority:
P2
-
Affects Version/s: 8
-
Component/s: tools
-
b19
-
Not verified
The following code should generate RuntimeVisibleTypeAnnotations attributes the method m, annotating the new instruction as well as the constructor invocation.
import java.lang.annotation.*;
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE_USE)
@interface X {}
interface Foo<T> {}
class Test { void m() { new Foo<@X String>() {}; } }
At present, neither are generated.
import java.lang.annotation.*;
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE_USE)
@interface X {}
interface Foo<T> {}
class Test { void m() { new Foo<@X String>() {}; } }
At present, neither are generated.
- relates to
-
JDK-8023682 Incorrect attributes emitted for anonymous class declaration
-
- Closed
-