mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
static import when inheritance present (IDEA-158357)
This commit is contained in:
+9
@@ -0,0 +1,9 @@
|
||||
package a;
|
||||
|
||||
import static a.A.foo;
|
||||
|
||||
interface B extends A {
|
||||
static void bar() {
|
||||
foo("");
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
import bar.A;
|
||||
import static bar.A.foo;
|
||||
|
||||
class Usage {
|
||||
void bar() {
|
||||
A.foo();
|
||||
foo();
|
||||
}
|
||||
}
|
||||
+7
@@ -56,6 +56,13 @@ public class LightAdvHighlightingFixtureTest extends LightCodeInsightFixtureTest
|
||||
myFixture.checkHighlighting();
|
||||
}
|
||||
|
||||
public void testStaticImportCompoundWithInheritance() throws Exception {
|
||||
myFixture.addClass("package a; public interface A { static void foo(Object o){} static void foo(String str) {}}");
|
||||
|
||||
myFixture.configureByFile(getTestName(false) + ".java");
|
||||
myFixture.checkHighlighting();
|
||||
}
|
||||
|
||||
public void testSuppressedInGenerated() throws Exception {
|
||||
myFixture.addClass("package javax.annotation; public @interface Generated {}");
|
||||
final RedundantCastInspection inspection = new RedundantCastInspection();
|
||||
|
||||
Reference in New Issue
Block a user