mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
method refs: take qualifier's type arguments in account: raw types
This commit is contained in:
@@ -591,7 +591,9 @@ public class LambdaUtil {
|
||||
if (signatureParameterTypes1.length != signatureParameterTypes2.length) {
|
||||
if (signatureParameterTypes1.length == signatureParameterTypes2.length + 1) {
|
||||
final PsiClassType classType = JavaPsiFacade.getElementFactory(psiClass.getProject()).createType(psiClass, psiSubstitutor);
|
||||
if (signatureParameterTypes1[0].equals(classType)) {
|
||||
final PsiType receiverType = signatureParameterTypes1[0];
|
||||
if (receiverType.equals(classType) ||
|
||||
(receiverType instanceof PsiClassType && ((PsiClassType)receiverType).isRaw() && receiverType.equals(TypeConversionUtil.erasure(classType)))) {
|
||||
offset++;
|
||||
}
|
||||
else {
|
||||
|
||||
+14
@@ -14,3 +14,17 @@ class MyTest {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class MyTest1 {
|
||||
interface I {
|
||||
String m(Foo f);
|
||||
}
|
||||
|
||||
static class Foo<X> {
|
||||
String foo() { return null; }
|
||||
|
||||
static void test() {
|
||||
I i = Foo::foo;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user