[java] report static interface field accessed via instance (IDEA-348722)

GitOrigin-RevId: f8b1b2036656ff5a4579dff82592e7bf4cfad8f9
This commit is contained in:
Bas Leijdekkers
2024-03-08 17:04:31 +01:00
committed by intellij-monorepo-bot
parent babfae316e
commit b474e948e3
3 changed files with 23 additions and 5 deletions

View File

@@ -0,0 +1,9 @@
// "Qualify static 'NAME' access with reference to class 'Grotesk'" "true-preview"
class Dreadful implements Grotesk {
void x() {
System.out.println(Grotesk.NAME);
}
}
interface Grotesk {
String NAME = "Grotesk";
}

View File

@@ -0,0 +1,9 @@
// "Qualify static 'NAME' access with reference to class 'Grotesk'" "true-preview"
class Dreadful implements Grotesk {
void x() {
System.out.println(this<caret>.NAME);
}
}
interface Grotesk {
String NAME = "Grotesk";
}