-
Bug
-
Resolution: Unresolved
-
P4
-
8
My colleague Chris Povirk noticed that for the following input, javac logs a warning to stderr and omits the type annotations from the output.
The issue is similar to the one discussed in this compiler-dev thread:
http://mail.openjdk.java.net/pipermail/type-annotations-dev/2013-April/000777.html
```
import static java.lang.annotation.ElementType.TYPE_USE;
import java.lang.annotation.Target;
@Target(TYPE_USE)
@interface Anno {}
class Lib<T> {}
class PositionUnknown {
Object foo() {
return new Lib<@Anno ?>[0];
}
}
```
```
$ javac -fullversion T.java
javac full version "14-ea+22-982"
ClassWriter: Position UNKNOWN in type annotation: @Anno
ClassWriter: Position UNKNOWN in type annotation: @Anno
```
The issue is similar to the one discussed in this compiler-dev thread:
http://mail.openjdk.java.net/pipermail/type-annotations-dev/2013-April/000777.html
```
import static java.lang.annotation.ElementType.TYPE_USE;
import java.lang.annotation.Target;
@Target(TYPE_USE)
@interface Anno {}
class Lib<T> {}
class PositionUnknown {
Object foo() {
return new Lib<@Anno ?>[0];
}
}
```
```
$ javac -fullversion T.java
javac full version "14-ea+22-982"
ClassWriter: Position UNKNOWN in type annotation: @Anno
ClassWriter: Position UNKNOWN in type annotation: @Anno
```