Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/staticImportMethod/afterOneAcceptable.java
Anna Kozlova 11606b6f47 java: add static import: don't pretend only one method is available when popup would be shown afterwards (IDEA-223655)
only applicable method is returned from `getMembersToImport(false, StaticMembersProcessor.SearchMode.MAX_2_MEMBERS)` when one of it is applicable and another is not. At the same time when we already calculate 100 first applicable methods, we can just reuse them instead the recalculation

GitOrigin-RevId: e31fe962bd8180850e8e5c06aa1f93efb7654aa5
2021-04-29 07:38:21 +00:00

42 lines
571 B
Java

// "Import static method..." "true"
package p;
import static p.FFF.myEqualTo;
public class X {
public void test() throws Exception {
assertMe("", myEqualTo(""));
}
<V> void assertMe(V v, M<V> m) {
}
}
class M<T> {
}
class FFF {
public static <T> M<T> myEqualTo(T operand) {
return null;
}
}
class LLL {
public static M<String> myEqualTo(int string) {
return null;
}
}
class XXX {
public static <T> M<T> myEqualTo(T operand) {
return null;
}
}
class YYY {
public static <T> M<T> myEqualTo(T operand) {
return null;
}
}