Fixed EA-70945
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
class A {
|
||||
val foo: Int = 0
|
||||
}
|
||||
|
||||
fun f() {
|
||||
A().foo(<caret>)
|
||||
}
|
||||
|
||||
// NUMBER: 0
|
||||
+6
@@ -113,6 +113,12 @@ public class JvmSmartCompletionTestGenerated extends AbstractJvmSmartCompletionT
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("EA70945.kt")
|
||||
public void testEA70945() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/EA70945.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("EmptyPrefix.kt")
|
||||
public void testEmptyPrefix() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/EmptyPrefix.kt");
|
||||
|
||||
@@ -188,6 +188,8 @@ class ExpectedInfos(
|
||||
|
||||
private fun calculateForArgument(callElement: KtCallElement, argument: ValueArgument): Collection<ExpectedInfo>? {
|
||||
val call = callElement.getCall(bindingContext) ?: return null
|
||||
// sometimes we get wrong call (see testEA70945) TODO: refactor resolve so that it does not happen
|
||||
if (call.callElement != callElement) return null
|
||||
return calculateForArgument(call, argument)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user