mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 03:13:40 +07:00
more specific method should be chosen before static access is checked (IDEA-101480)
This commit is contained in:
+11
@@ -0,0 +1,11 @@
|
||||
class Foo {
|
||||
public void foo() {}
|
||||
|
||||
public static void foo(String... s){}
|
||||
}
|
||||
|
||||
class A {
|
||||
{
|
||||
Foo.<error descr="Non-static method 'foo()' cannot be referenced from a static context">foo</error>();
|
||||
}
|
||||
}
|
||||
+1
@@ -166,4 +166,5 @@ public class LightAdvHighlightingJdk7Test extends LightDaemonAnalyzerTestCase {
|
||||
public void testWrongArgsAndUnknownTypeParams() throws Exception { doTest(false, false); }
|
||||
public void testAmbiguousMethodCallIDEA97983() throws Exception { doTest(false, false); }
|
||||
public void testAmbiguousMethodCallIDEA100314() throws Exception { doTest(false, false); }
|
||||
public void testInstanceMemberNotAccessibleInStaticContext() throws Exception { doTest(false, false); }
|
||||
}
|
||||
|
||||
@@ -204,7 +204,7 @@ public class ResolveMethodTest extends ResolveTestCase {
|
||||
PsiElement target = resolve();
|
||||
assertTrue(target instanceof PsiMethod);
|
||||
PsiMethod method = (PsiMethod) target;
|
||||
assertEquals(1, method.getParameterList().getParametersCount());
|
||||
assertEquals(0, method.getParameterList().getParametersCount());
|
||||
}
|
||||
|
||||
public void testClone() throws Exception{
|
||||
|
||||
Reference in New Issue
Block a user