KT-3472 Can't navigate to source by clicking on a SAM constructor

#KT-3472 fixed
This commit is contained in:
Evgeny Gerashchenko
2013-06-27 23:05:47 +04:00
parent b7b74cd3b8
commit 06bfb1d017
4 changed files with 11 additions and 1 deletions
@@ -196,7 +196,7 @@ public class BindingContextUtils {
@NotNull
private static List<PsiElement> callableDescriptorToDeclarations(@NotNull BindingContext context, @NotNull CallableMemberDescriptor callable) {
if (callable.getKind() == CallableMemberDescriptor.Kind.SYNTHESIZED) {
DeclarationDescriptor source = context.get(BindingContext.SOURCE_DESCRIPTOR_FOR_SYNTHESIZED, callable);
DeclarationDescriptor source = context.get(BindingContext.SOURCE_DESCRIPTOR_FOR_SYNTHESIZED, callable.getOriginal());
return source != null ? descriptorToDeclarations(context, source) : Collections.<PsiElement>emptyList();
}
+1
View File
@@ -0,0 +1 @@
val c = javax.swing.SwingUtilities.<caret>invokeLater { }
@@ -0,0 +1 @@
val c = java.util.<caret>Comparator<Int> { x, y -> 1 }
@@ -54,6 +54,14 @@ public class ResolveBaseTest extends LightCodeInsightTestCase {
doSingleResolveTest("(java.util).Comparator");
}
public void testSamConstructorTypeArguments() throws Exception {
doSingleResolveTest("(java.util).Comparator");
}
public void testSamAdapter() throws Exception {
doSingleResolveTest("(in javax.swing.SwingUtilities).invokeLater(Runnable)");
}
public void testSeveralOverrides() throws Exception {
doMultiResolveTest();
}