EA-41161 - CCE: JavaTreeGenerator.generateTreeFor: create from usage with method ref on the right

(cherry-picked from 04f7b76)
This commit is contained in:
anna
2012-11-23 20:59:58 +01:00
parent f5546bc0c0
commit 10cecacf14
3 changed files with 17 additions and 1 deletions

View File

@@ -80,6 +80,6 @@ public class PsiTypeVisitor<A> {
final PsiMethodReferenceExpression expression = methodReferenceType.getExpression();
final PsiType interfaceType = expression.getFunctionalInterfaceType();
if (interfaceType != null) return interfaceType.accept(this);
return visitType(methodReferenceType);
return visitType(interfaceType);
}
}

View File

@@ -0,0 +1,8 @@
// "Create Local Variable 'zeit'" "true"
public class A {
void foo() {
Object zeit<caret> = A::foo;
}
static void foo(){}
}

View File

@@ -0,0 +1,8 @@
// "Create Local Variable 'zeit'" "true"
public class A {
void foo() {
ze<caret>it = A::foo;
}
static void foo(){}
}