KT-7901 Auto import is not suggested
KT-7229 Completion for extension functions with complex capture #KT-7901 Fixed #KT-7229 Fixed
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
trait I<T>
|
||||
|
||||
fun <E, T : I<E>> T.ext() : T = this
|
||||
|
||||
class A<T> : I<T>
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val a = A<Int>()
|
||||
a.<caret>
|
||||
}
|
||||
|
||||
// EXIST: ext
|
||||
@@ -0,0 +1,11 @@
|
||||
interface D<T>
|
||||
|
||||
fun <T1, T2 : D<T1>> T2.ext() {}
|
||||
|
||||
class C : D<String> {
|
||||
fun foo() {
|
||||
this.<caret>
|
||||
}
|
||||
}
|
||||
|
||||
// EXIST: ext
|
||||
+12
@@ -1176,6 +1176,18 @@ public class JSBasicCompletionTestGenerated extends AbstractJSBasicCompletionTes
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/extensions"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("ComplexCapture.kt")
|
||||
public void testComplexCapture() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/ComplexCapture.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ComplexCapture2.kt")
|
||||
public void testComplexCapture2() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/ComplexCapture2.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ExtensionInExtendedClass.kt")
|
||||
public void testExtensionInExtendedClass() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/ExtensionInExtendedClass.kt");
|
||||
|
||||
+12
@@ -1176,6 +1176,18 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/extensions"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("ComplexCapture.kt")
|
||||
public void testComplexCapture() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/ComplexCapture.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ComplexCapture2.kt")
|
||||
public void testComplexCapture2() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/ComplexCapture2.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ExtensionInExtendedClass.kt")
|
||||
public void testExtensionInExtendedClass() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/ExtensionInExtendedClass.kt");
|
||||
|
||||
Reference in New Issue
Block a user