diff --git a/idea/testData/completion/handlers/DoNotInsertImportForAlreadyImported.kt b/idea/testData/completion/handlers/DoNotInsertImportForAlreadyImported.kt new file mode 100644 index 00000000000..ba1d9f3c532 --- /dev/null +++ b/idea/testData/completion/handlers/DoNotInsertImportForAlreadyImported.kt @@ -0,0 +1,5 @@ +// KT-2424 Invoking completion adds unnecessary FQ name + +fun main(args: Array) { + throw IllegalAccessExceptio() //Press Ctrl+Space and select it +} \ No newline at end of file diff --git a/idea/testData/completion/handlers/DoNotInsertImportForAlreadyImported.kt.after b/idea/testData/completion/handlers/DoNotInsertImportForAlreadyImported.kt.after new file mode 100644 index 00000000000..8d24212dac5 --- /dev/null +++ b/idea/testData/completion/handlers/DoNotInsertImportForAlreadyImported.kt.after @@ -0,0 +1,5 @@ +// KT-2424 Invoking completion adds unnecessary FQ name + +fun main(args: Array) { + throw IllegalAccessException() //Press Ctrl+Space and select it +} \ No newline at end of file diff --git a/idea/tests/org/jetbrains/jet/completion/handlers/CompletionHandlerTest.java b/idea/tests/org/jetbrains/jet/completion/handlers/CompletionHandlerTest.java index 91297f67b13..f54728abc05 100644 --- a/idea/tests/org/jetbrains/jet/completion/handlers/CompletionHandlerTest.java +++ b/idea/tests/org/jetbrains/jet/completion/handlers/CompletionHandlerTest.java @@ -38,6 +38,10 @@ public class CompletionHandlerTest extends LightCompletionTestCase { doTest(CompletionType.BASIC, 2, "SortedSet", null); } + public void testDoNotInsertImportForAlreadyImported() { + doTest(); + } + public void testNonStandardArray() { doTest(CompletionType.BASIC, 2, "Array", "java.lang.reflect"); }