mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 23:39:39 +07:00
add single static import: allow second single static import if it doesn't produce ambiguity or hiding of on-demand import (IDEA-155031)
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
// "Add static import for 'test.Bar.f'" "true"
|
||||
package test;
|
||||
|
||||
import static test.Bar.*;
|
||||
|
||||
class Bar {
|
||||
public static final void f() {}
|
||||
}
|
||||
public class Foo {
|
||||
{
|
||||
f();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
// "Add static import for 'test.Bar.f'" "true"
|
||||
package test;
|
||||
|
||||
import static test.Bar.f;
|
||||
import static test.Bar1.f;
|
||||
|
||||
class Bar {
|
||||
public static final void f() {}
|
||||
}
|
||||
|
||||
class Bar1 {
|
||||
public static final void f(int i) {}
|
||||
}
|
||||
public class Foo {
|
||||
{
|
||||
f();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
// "Add static import for 'test.Bar.f'" "true"
|
||||
package test;
|
||||
|
||||
import static test.Bar.*;
|
||||
|
||||
class Bar {
|
||||
public static final void f() {}
|
||||
}
|
||||
public class Foo {
|
||||
{
|
||||
Bar.<caret>f();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
// "Add static import for 'test.Bar.f'" "false"
|
||||
package test;
|
||||
|
||||
import static test.Bar1.f;
|
||||
|
||||
class Bar {
|
||||
public static final void f() {}
|
||||
}
|
||||
|
||||
class Bar1 {
|
||||
public static final void f() {}
|
||||
}
|
||||
public class Foo {
|
||||
{
|
||||
Bar.<caret>f();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
// "Add static import for 'test.Bar.f'" "true"
|
||||
package test;
|
||||
|
||||
import static test.Bar1.f;
|
||||
|
||||
class Bar {
|
||||
public static final void f() {}
|
||||
}
|
||||
|
||||
class Bar1 {
|
||||
public static final void f(int i) {}
|
||||
}
|
||||
public class Foo {
|
||||
{
|
||||
Bar.<caret>f();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user