diff --git a/idea/idea-completion/src/org/jetbrains/kotlin/idea/completion/CompletionSession.kt b/idea/idea-completion/src/org/jetbrains/kotlin/idea/completion/CompletionSession.kt index 2acd3773a28..29ce4c4e9ad 100644 --- a/idea/idea-completion/src/org/jetbrains/kotlin/idea/completion/CompletionSession.kt +++ b/idea/idea-completion/src/org/jetbrains/kotlin/idea/completion/CompletionSession.kt @@ -118,7 +118,7 @@ abstract class CompletionSession( protected val descriptorNameFilter: (Name) -> Boolean = run { val nameFilter = prefixMatcher.asNameFilter() - val getOrSetPrefix = listOf("get", "set").firstOrNull { prefix.startsWith(it) } + val getOrSetPrefix = listOf("get", "set", "ge", "se", "g", "s").firstOrNull { prefix.startsWith(it) } if (getOrSetPrefix != null) nameFilter or prefixMatcher.cloneWithPrefix(prefix.removePrefix(getOrSetPrefix).decapitalizeSmart()).asNameFilter() else diff --git a/idea/idea-completion/testData/basic/java/KT9166.kt b/idea/idea-completion/testData/basic/java/KT9166.kt new file mode 100644 index 00000000000..68550420b45 --- /dev/null +++ b/idea/idea-completion/testData/basic/java/KT9166.kt @@ -0,0 +1,8 @@ +import java.io.File + +fun foo(file: File) { + file.g +} + +// EXIST: absolutePath +// ABSENT: getAbsolutePath \ No newline at end of file diff --git a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/JvmBasicCompletionTestGenerated.java b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/JvmBasicCompletionTestGenerated.java index 268c682347b..8ce218b11d7 100644 --- a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/JvmBasicCompletionTestGenerated.java +++ b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/JvmBasicCompletionTestGenerated.java @@ -2647,6 +2647,12 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT doTest(fileName); } + @TestMetadata("KT9166.kt") + public void testKT9166() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/KT9166.kt"); + doTest(fileName); + } + @TestMetadata("NoDuplicationForImportedJavaClass.kt") public void testNoDuplicationForImportedJavaClass() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/NoDuplicationForImportedJavaClass.kt");