-
Sub-task
-
Resolution: Not an Issue
-
P2
-
None
-
8
-
Verified
The following program should emit a class file with a RuntimeVisibleTypeAnnotations attribute on TestWildcard.meth with a type path of [WILDCARD]. Instead, the type path is [TYPE_ARGUMENT(0)].
import java.lang.annotation.*;
import static java.lang.annotation.RetentionPolicy.*;
import static java.lang.annotation.ElementType.*;
class WithArgs<T> {}
public class TestWildcard {
public void meth(WithArgs<@A @A @B @B ?> a) {}
}
@Retention(RUNTIME)
@Target({TYPE_USE,TYPE_PARAMETER})
@interface AC { A[] value(); }
@Retention(RUNTIME)
@Target({TYPE_USE,TYPE_PARAMETER})
@Repeatable(AC.class)
@interface A { }@Retention(RUNTIME)
@Target({TYPE_USE})
@interface BC { B[] value(); }
@Retention(RUNTIME)
@Target({TYPE_USE})
@Repeatable(BC.class)
@interface B { }
import java.lang.annotation.*;
import static java.lang.annotation.RetentionPolicy.*;
import static java.lang.annotation.ElementType.*;
class WithArgs<T> {}
public class TestWildcard {
public void meth(WithArgs<@A @A @B @B ?> a) {}
}
@Retention(RUNTIME)
@Target({TYPE_USE,TYPE_PARAMETER})
@interface AC { A[] value(); }
@Retention(RUNTIME)
@Target({TYPE_USE,TYPE_PARAMETER})
@Repeatable(AC.class)
@interface A { }@Retention(RUNTIME)
@Target({TYPE_USE})
@interface BC { B[] value(); }
@Retention(RUNTIME)
@Target({TYPE_USE})
@Repeatable(BC.class)
@interface B { }