-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't read
<clinit>
s from class files
This was causing an error when checking required annotation elements for annotations with `<clinit>`s read from bytecode: ``` error: missing required annotation argument: <clinit> @foo ``` bazelbuild/bazel#13144 PiperOrigin-RevId: 360553027
- Loading branch information
Showing
3 changed files
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
javatests/com/google/turbine/lower/testdata/annotation_clinit.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
%%% pkg/Anno.java %%% | ||
package pkg; | ||
|
||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
|
||
@Retention(RetentionPolicy.RUNTIME) | ||
public @interface Anno { | ||
String CONSTANT = Anno.class.toString(); | ||
|
||
String value() default ""; | ||
} | ||
|
||
=== pkg/T.java === | ||
package pkg; | ||
|
||
@Anno | ||
class T {} |