[java-highlighting] IDEA-289314 Missing highlighting for nested type annotations on static types

- annotations are checked recursively

GitOrigin-RevId: a8343f6bbfbf2dd39b29dad8ce1e989e71a0e549
This commit is contained in:
Mikhail Pyltsin
2023-11-13 14:45:48 +01:00
committed by intellij-monorepo-bot
parent 8adeaf3193
commit 87dc3f3fbf
2 changed files with 24 additions and 1 deletions

View File

@@ -133,4 +133,21 @@ class Outer {
IntFunction<Super> f = Outer.<error descr="Annotations are not allowed here">@TA</error> This.super::getField;
}
}
void testAnnotation() {
<error descr="Static member qualifying type may not be annotated">@TA</error> T.Y.U.I.O o2;
T.<error descr="Static member qualifying type may not be annotated">@TA</error> Y.U.I.O o;
T.Y.<error descr="Static member qualifying type may not be annotated">@TA</error> U.I.O o3;
T.Y.U.<error descr="Static member qualifying type may not be annotated">@TA</error> I.O o4;
}
public class T {
public static class Y {
public class U {
public class I {
public static class O { }
}
}
}
}
}