-
Bug
-
Resolution: Unresolved
-
P4
-
None
Consider:
```
import java.lang.annotation.*;
@Target(ElementType.TYPE_USE)
@interface Foo{}
class One {
class I {}
}
class Two<T> extends One {
Two<@Foo Object>.I f;
}
```
The canonical type of `Two<@Foo Object>.I` is `One.I`. When javac compiles this input it produces the following for the field 'f':
One$I f;
descriptor: LOne$I;
flags: (0x0000)
RuntimeInvisibleTypeAnnotations:
0: #12(): FIELD, location=[TYPE_ARGUMENT(0)]
Foo
Note that the type_path for the type annotation in `Two<@Foo Object>.I` refers to a type argument that does not exist in the canonical type `One.I`.
```
import java.lang.annotation.*;
@Target(ElementType.TYPE_USE)
@interface Foo{}
class One {
class I {}
}
class Two<T> extends One {
Two<@Foo Object>.I f;
}
```
The canonical type of `Two<@Foo Object>.I` is `One.I`. When javac compiles this input it produces the following for the field 'f':
One$I f;
descriptor: LOne$I;
flags: (0x0000)
RuntimeInvisibleTypeAnnotations:
0: #12(): FIELD, location=[TYPE_ARGUMENT(0)]
Foo
Note that the type_path for the type annotation in `Two<@Foo Object>.I` refers to a type argument that does not exist in the canonical type `One.I`.