diff --git a/idea/src/org/jetbrains/kotlin/idea/highlighter/markers/KotlinLineMarkerProvider.kt b/idea/src/org/jetbrains/kotlin/idea/highlighter/markers/KotlinLineMarkerProvider.kt index ea9ccef4e16..52a0c18a1f3 100644 --- a/idea/src/org/jetbrains/kotlin/idea/highlighter/markers/KotlinLineMarkerProvider.kt +++ b/idea/src/org/jetbrains/kotlin/idea/highlighter/markers/KotlinLineMarkerProvider.kt @@ -95,6 +95,7 @@ class KotlinLineMarkerProvider : LineMarkerProviderDescriptor() { for (leaf in elements) { ProgressManager.checkCanceled() + if (leaf !is PsiIdentifier && leaf.firstChild != null) continue val element = leaf.parent as? KtNamedDeclaration ?: continue if (!declarations.add(element)) continue diff --git a/idea/testData/multiModuleLineMarker/fromActualAnnotationWithParametersInOneLine/jvm/jvm.kt b/idea/testData/multiModuleLineMarker/fromActualAnnotationWithParametersInOneLine/jvm/jvm.kt index e54dfb4587d..e44371c8b76 100644 --- a/idea/testData/multiModuleLineMarker/fromActualAnnotationWithParametersInOneLine/jvm/jvm.kt +++ b/idea/testData/multiModuleLineMarker/fromActualAnnotationWithParametersInOneLine/jvm/jvm.kt @@ -3,10 +3,6 @@ actual annotation class Ann actual val z: Double, actual val b: Boolean ) -// TODO: first marker on 'Ann' is generated twice here, see collectSlowLineMarkers main loop. -// Since it's fragile place, I don't want to fix it right now - - /* LINEMARKER: Has declaration in common module TARGETS: @@ -15,11 +11,6 @@ expect annotation class <1>Ann( *//* LINEMARKER: Has declaration in common module TARGETS: -common.kt -expect annotation class <1>Ann( -*//* -LINEMARKER: Has declaration in common module -TARGETS: common.kt val <1>x: Int, val <2>y: String, *//*