Smart completion: bugfix - no function reference after dot
This commit is contained in:
@@ -89,7 +89,9 @@ class SmartCompletion(val expression: JetSimpleNameExpression,
|
|||||||
result.add(addTailToLookupElement(lookupElement, matchedExpectedTypes))
|
result.add(addTailToLookupElement(lookupElement, matchedExpectedTypes))
|
||||||
}
|
}
|
||||||
|
|
||||||
toFunctionReferenceLookupElement(descriptor, functionExpectedTypes)?.let { result.add(it) }
|
if (receiver == null) {
|
||||||
|
toFunctionReferenceLookupElement(descriptor, functionExpectedTypes)?.let { result.add(it) }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (receiver == null) {
|
if (receiver == null) {
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
class X{
|
||||||
|
fun foo(p: () -> Unit){}
|
||||||
|
|
||||||
|
fun bar() {
|
||||||
|
foo(this.<caret>)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun f(){}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NUMBER: 0
|
||||||
@@ -211,6 +211,11 @@ public class JvmSmartCompletionTestGenerated extends AbstractJvmSmartCompletionT
|
|||||||
doTest("idea/testData/completion/smart/NoConstructorWithQualifier.kt");
|
doTest("idea/testData/completion/smart/NoConstructorWithQualifier.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("NoFunctionReferenceAfterQualifier.kt")
|
||||||
|
public void testNoFunctionReferenceAfterQualifier() throws Exception {
|
||||||
|
doTest("idea/testData/completion/smart/NoFunctionReferenceAfterQualifier.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("NoNothing.kt")
|
@TestMetadata("NoNothing.kt")
|
||||||
public void testNoNothing() throws Exception {
|
public void testNoNothing() throws Exception {
|
||||||
doTest("idea/testData/completion/smart/NoNothing.kt");
|
doTest("idea/testData/completion/smart/NoNothing.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user