KotlinLineMarkerProvider: ignore non-leaf elements when putting gutters (KT-28075, KT-30052, KT-33182)

previously for instance `KtClassBody` could get here as `leaf` and `leaf.parent` will return `KtClass` for it, making gutter for `KtClass` appear twice if origingal identifier and `KtClassBody` got here in different passes (one in "inner" other in "outer")
This commit is contained in:
Nicolay Mitropolsky
2019-08-07 14:12:49 +03:00
parent c3ea0a1e5b
commit 51e007116f
2 changed files with 1 additions and 9 deletions
@@ -3,10 +3,6 @@ actual annotation class <lineMarker descr="Has declaration in common module">Ann
actual val <lineMarker descr="Has declaration in common module">z</lineMarker>: 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,
*//*