Do not stop recursive visitor with return
#KT-23627 Fixed
This commit is contained in:
@@ -0,0 +1,7 @@
|
|||||||
|
fun foo() = "".run {
|
||||||
|
this.apply {
|
||||||
|
printl<caret>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//ELEMENT: println
|
||||||
|
//TAIL_TEXT: "() (kotlin.io)"
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
fun foo() = "".run {
|
||||||
|
this.apply {
|
||||||
|
println()<caret>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//ELEMENT: println
|
||||||
|
//TAIL_TEXT: "() (kotlin.io)"
|
||||||
+6
@@ -114,6 +114,12 @@ public class BasicCompletionHandlerTestGenerated extends AbstractBasicCompletion
|
|||||||
runTest("idea/idea-completion/testData/handlers/basic/KT14130.kt");
|
runTest("idea/idea-completion/testData/handlers/basic/KT14130.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("KT23627.kt")
|
||||||
|
public void testKT23627() throws Exception {
|
||||||
|
runTest("idea/idea-completion/testData/handlers/basic/KT23627.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@TestMetadata("NestedTypeArg.kt")
|
@TestMetadata("NestedTypeArg.kt")
|
||||||
public void testNestedTypeArg() throws Exception {
|
public void testNestedTypeArg() throws Exception {
|
||||||
runTest("idea/idea-completion/testData/handlers/basic/NestedTypeArg.kt");
|
runTest("idea/idea-completion/testData/handlers/basic/NestedTypeArg.kt");
|
||||||
|
|||||||
@@ -430,7 +430,12 @@ class ShortenReferences(val options: (KtElement) -> Options = { Options.DEFAULT
|
|||||||
|
|
||||||
override val collectElementsVisitor = object : MyVisitor(elementFilter) {
|
override val collectElementsVisitor = object : MyVisitor(elementFilter) {
|
||||||
override fun visitDotQualifiedExpression(expression: KtDotQualifiedExpression) {
|
override fun visitDotQualifiedExpression(expression: KtDotQualifiedExpression) {
|
||||||
if (expression.receiverExpression is KtThisExpression && !options.removeThis) return
|
if (expression.receiverExpression is KtThisExpression && !options.removeThis) {
|
||||||
|
val filterResult = elementFilter(expression)
|
||||||
|
if (filterResult == FilterResult.SKIP) return
|
||||||
|
expression.selectorExpression?.acceptChildren(this)
|
||||||
|
return
|
||||||
|
}
|
||||||
super.visitDotQualifiedExpression(expression)
|
super.visitDotQualifiedExpression(expression)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
@@ -31,6 +31,8 @@ import org.jetbrains.kotlin.idea.caches.project.ScriptModuleSearchScope
|
|||||||
import org.jetbrains.kotlin.load.java.AbstractJavaClassFinder
|
import org.jetbrains.kotlin.load.java.AbstractJavaClassFinder
|
||||||
import org.jetbrains.kotlin.resolve.jvm.KotlinSafeClassFinder
|
import org.jetbrains.kotlin.resolve.jvm.KotlinSafeClassFinder
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class KotlinScriptDependenciesClassFinder(project: Project,
|
class KotlinScriptDependenciesClassFinder(project: Project,
|
||||||
private val scriptDependenciesManager: ScriptDependenciesManager
|
private val scriptDependenciesManager: ScriptDependenciesManager
|
||||||
) : NonClasspathClassFinder(project), KotlinSafeClassFinder {
|
) : NonClasspathClassFinder(project), KotlinSafeClassFinder {
|
||||||
|
|||||||
Reference in New Issue
Block a user