java: reject non-TypeName qualifiers before constant field refs (IDEA-262804)

GitOrigin-RevId: 1aa7a1dbc1c24ad5d4af5c271f454aaa92cefcde
This commit is contained in:
Anna Kozlova
2021-02-25 12:06:48 +01:00
committed by intellij-monorepo-bot
parent ea9efe9b09
commit 7c9f254340
2 changed files with 8 additions and 0 deletions

View File

@@ -6,7 +6,10 @@
class D {
int field;
final int field1 = 1;
@Ann(i=<error descr="Attribute value must be constant">field</error>) void foo () {}
@Ann(i=<error descr="Attribute value must be constant">this.field1</error>) void foo1 () {}
@Ann(i=field1, j = {}) void foo2 () {}
@Ann(j={<error descr="Attribute value must be constant">null</error>}) void bar() {}
}