-
Bug
-
Resolution: Fixed
-
P2
-
9
-
b77
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8136279 | emb-9 | Jan Lahoda | P2 | Resolved | Fixed | team |
Reported here:
http://mail.openjdk.java.net/pipermail/compiler-dev/2015-July/009687.html
Consider this test case:
--- CFInImport.java
/**
* @test
* @compile Bar.java Super.java
* @clean p.Super
* @compile CFInImport.java
*/
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Retention;
import static p.Bar.CONST;
@Retention(RetentionPolicy.RUNTIME)
@interface Foo {}
---
--- Bar.java
package p;
public class Bar extends Super {}
---
--- Super.java
package p;
public class Super {
public static int CONST = 42;
}
---
Running it will lead to:
---
.../CFInImport.java:12: error: annotation type not applicable to this kind of declaration
@Retention(RetentionPolicy.RUNTIME)
^
1 error
result: Error. compiler crashed (exit code 4)
---
The error is incorrect, but is only a consequence of javac crashing with a CompletionFailure.
http://mail.openjdk.java.net/pipermail/compiler-dev/2015-July/009687.html
Consider this test case:
--- CFInImport.java
/**
* @test
* @compile Bar.java Super.java
* @clean p.Super
* @compile CFInImport.java
*/
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Retention;
import static p.Bar.CONST;
@Retention(RetentionPolicy.RUNTIME)
@interface Foo {}
---
--- Bar.java
package p;
public class Bar extends Super {}
---
--- Super.java
package p;
public class Super {
public static int CONST = 42;
}
---
Running it will lead to:
---
.../CFInImport.java:12: error: annotation type not applicable to this kind of declaration
@Retention(RetentionPolicy.RUNTIME)
^
1 error
result: Error. compiler crashed (exit code 4)
---
The error is incorrect, but is only a consequence of javac crashing with a CompletionFailure.
- backported by
-
JDK-8136279 CompletionFailure during import listing crashes javac
-
- Resolved
-