KT-3472 Can't navigate to source by clicking on a SAM constructor
#KT-3472 fixed
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user