KT-9738 Code completion of "emptyList()" after elvis operator inserts explicit type arguments
#KT-9738 Fixed
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
fun foo(list: List<String>, b: Boolean) {
|
||||
val v = if (b) list else emp<caret>
|
||||
}
|
||||
|
||||
// ELEMENT: emptyList
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
fun foo(list: List<String>, b: Boolean) {
|
||||
val v = if (b) list else emptyList()<caret>
|
||||
}
|
||||
|
||||
// ELEMENT: emptyList
|
||||
@@ -0,0 +1,5 @@
|
||||
fun foo(list: List<String>?) {
|
||||
val v = list ?: emp<caret>
|
||||
}
|
||||
|
||||
// ELEMENT: emptyList
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
fun foo(list: List<String>?) {
|
||||
val v = list ?: emptyList()<caret>
|
||||
}
|
||||
|
||||
// ELEMENT: emptyList
|
||||
+12
@@ -687,6 +687,18 @@ public class BasicCompletionHandlerTestGenerated extends AbstractBasicCompletion
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class TypeArgsForCall extends AbstractBasicCompletionHandlerTest {
|
||||
@TestMetadata("AfterElse.kt")
|
||||
public void testAfterElse() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/typeArgsForCall/AfterElse.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("AfterElvis.kt")
|
||||
public void testAfterElvis() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/typeArgsForCall/AfterElvis.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInTypeArgsForCall() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/handlers/basic/typeArgsForCall"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user